IndexedDB: Implement custom bindings for parsing options
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-18  Michael Pruett  <michael@68k.org>
2
3         IndexedDB: Implement custom bindings for parsing options
4         https://bugs.webkit.org/show_bug.cgi?id=96614
5
6         Reviewed by Darin Adler.
7
8         Parsing the options dictionary in IDBDatabase.createObjectStore()
9         and IDBObjectStore.createIndex() requires custom bindings in JSC.
10
11         Tests: storage/indexeddb/*
12
13         * GNUmakefile.list.am:
14         * Modules/indexeddb/IDBDatabase.cpp:
15         (WebCore::IDBDatabase::createObjectStore):
16         (WebCore):
17         * Modules/indexeddb/IDBDatabase.h:
18         (IDBDatabase):
19         * Modules/indexeddb/IDBDatabase.idl:
20         * Modules/indexeddb/IDBObjectStore.cpp:
21         (WebCore::IDBObjectStore::createIndex):
22         (WebCore):
23         * Modules/indexeddb/IDBObjectStore.h:
24         (IDBObjectStore):
25         * Modules/indexeddb/IDBObjectStore.idl:
26         * UseJSC.cmake:
27         * bindings/js/IDBBindingUtilities.cpp:
28         (WebCore::idbKeyPathFromValue): Added utility function for converting a JSValue to an IDBKeyPath.
29         (WebCore):
30         * bindings/js/IDBBindingUtilities.h:
31         (WebCore):
32         * bindings/js/JSIDBDatabaseCustom.cpp: Added.
33         (WebCore):
34         (WebCore::JSIDBDatabase::createObjectStore):
35         * bindings/js/JSIDBObjectStoreCustom.cpp: Added.
36         (WebCore):
37         (WebCore::JSIDBObjectStore::createIndex):
38
39 2012-12-18  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
40
41         Cannot click an element at 2nd line or more inside inline-block in vertical writing mode.
42         https://bugs.webkit.org/show_bug.cgi?id=104775
43
44         Reviewed by Dean Jackson.
45
46         If the parent of an inline box changes writing mode, then the inline box must flip incoming hit point coordinates.
47         Otherwise, the coordinate will be misunderstood because the box has a different origin from its parent.
48         If the InlineBox doesn't flip its offset, its children will use the wrong offset
49         because they don't know their grandparent changed writing modes.
50         InlineBox::nodeAtPoint should flip accumulatedOffset like InlineBox::paint().
51
52         Test: fast/writing-mode/vertical-inline-block-hittest.html
53
54         * rendering/InlineBox.cpp:
55         (WebCore::InlineBox::nodeAtPoint):
56
57 2012-12-18  Simon Fraser  <simon.fraser@apple.com>
58
59         Allow position:sticky elements to be moved by the scrolling thread
60         https://bugs.webkit.org/show_bug.cgi?id=105245
61
62         Reviewed by Beth Dakin.
63
64         Allow sticky position elements to be repositioned on the scrolling thread.
65         
66         RenderLayerCompositor::requiresCompositingForPosition() is changed to make
67         all position:-webkit-sticky elements composited.
68         
69         Sticky position constraints are already communicated to the ScrollingCoordinator,
70         but now we created ScrollingStateStickyNodes for them, and send the constraints
71         over to the scrolling thread for new ScrollingTreeStickyNodes. That allows
72         their layers to be repositioned on the scrolling thread.
73
74         Tests: platform/mac/tiled-drawing/sticky/sticky-horizontal.html
75                platform/mac/tiled-drawing/sticky/sticky-vertical.html
76
77         * WebCore.xcodeproj/project.pbxproj: Add new files.
78         * page/scrolling/ScrollingConstraints.h:
79         (WebCore::StickyPositionViewportConstraints::absoluteContainingBlockRect): New accessors.
80         (WebCore::StickyPositionViewportConstraints::absoluteStickyBoxRect):
81         (WebCore::StickyPositionViewportConstraints::operator==):
82         (WebCore::StickyPositionViewportConstraints::operator!=):
83         * page/scrolling/ScrollingCoordinator.h: Added StickyNode type.
84         * page/scrolling/ScrollingStateFixedNode.cpp:
85         (WebCore::ScrollingStateFixedNode::syncLayerPositionForViewportRect):
86         New virtual method that allows different kinds of nodes to sync layer positions.
87         * page/scrolling/ScrollingStateFixedNode.h:
88         * page/scrolling/ScrollingStateNode.h:
89         (WebCore::ScrollingStateNode::isStickyNode):
90         (WebCore::ScrollingStateNode::syncLayerPositionForViewportRect):
91         * page/scrolling/ScrollingStateStickyNode.cpp: Added.
92         (WebCore::ScrollingStateStickyNode::create):
93         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
94         (WebCore::ScrollingStateStickyNode::~ScrollingStateStickyNode):
95         (WebCore::ScrollingStateStickyNode::clone):
96         (WebCore::ScrollingStateStickyNode::updateConstraints):
97         (WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect):
98         (WebCore::ScrollingStateStickyNode::dumpProperties):
99         * page/scrolling/ScrollingStateStickyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateFixedNode.h.
100         (ScrollingStateStickyNode):
101         (WebCore::ScrollingStateStickyNode::viewportConstraints):
102         (WebCore::toScrollingStateStickyNode):
103         * page/scrolling/ScrollingTree.cpp:
104         (WebCore::ScrollingTree::updateTreeFromStateNode):
105         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
106         (WebCore::ScrollingCoordinatorMac::attachToStateTree): Handle sticky nodes.
107         (WebCore::ScrollingCoordinatorMac::syncChildPositions): Generalize to different kinds of nodes by
108         calling a virtual method on the node.
109         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
110         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
111         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
112         * page/scrolling/mac/ScrollingTreeStickyNode.h: Added.
113         (ScrollingTreeStickyNode):
114         * page/scrolling/mac/ScrollingTreeStickyNode.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm.
115         (WebCore::ScrollingTreeStickyNode::create):
116         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
117         (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
118         (WebCore::ScrollingTreeStickyNode::update):
119         (WebCore::operator*):
120         (WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
121         * rendering/RenderLayerBacking.cpp:
122         (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
123         * rendering/RenderLayerCompositor.cpp:
124         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
125         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
126         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
127         (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
128         * rendering/RenderLayerCompositor.h:
129         (RenderLayerCompositor):
130
131 2012-12-18  David Grogan  <dgrogan@chromium.org>
132
133         IndexedDB: Split BackingStore histogram
134         https://bugs.webkit.org/show_bug.cgi?id=105222
135
136         Reviewed by Tony Chang.
137
138         Add separate histograms for Consistency, Write, and Read errors.
139         Recategorize some read errors as consistency errors.
140
141         Tested the preprocessor logic by manually making some functions fail
142         and printing the histogram string from chromium code.
143
144         Next up is logging successes to get an idea of which functions have
145         the highest failure _rate_.
146
147         * Modules/indexeddb/IDBBackingStore.cpp:
148         (WebCore::recordInternalError):
149         (WebCore):
150         (WebCore::setUpMetadata):
151         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
152         (WebCore::getNewDatabaseId):
153         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
154         (WebCore::IDBBackingStore::getObjectStores):
155         (WebCore::setMaxObjectStoreId):
156         (WebCore::IDBBackingStore::deleteObjectStore):
157         (WebCore::IDBBackingStore::getRecord):
158         (WebCore::getNewVersionNumber):
159         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
160         (WebCore::IDBBackingStore::keyExistsInObjectStore):
161         (WebCore::IDBBackingStore::getIndexes):
162         (WebCore::setMaxIndexId):
163         (WebCore::versionExists):
164         (WebCore::IDBBackingStore::findKeyInIndex):
165         (WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
166         (WebCore::IDBBackingStore::keyExistsInIndex):
167         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
168         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
169         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
170         (WebCore::IndexCursorImpl::loadCurrentRow):
171
172 2012-12-18  Dean Jackson  <dino@apple.com>
173
174         Track menu needs localization
175         https://bugs.webkit.org/show_bug.cgi?id=105233
176
177         Reviewed by Eric Carlson.
178
179         Allow the UI strings in the closed captions menu to be localized, and
180         profile strings for the English locale.
181
182         Test: media/video-controls-captions-trackmenu-localized.html
183
184         * English.lproj/Localizable.strings: Adds the four new captions strings.
185         * html/shadow/MediaControlElements.cpp:
186         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Use localized getters.
187         * platform/LocalizedStrings.cpp:
188         (WebCore::textTrackClosedCaptionsText): New localized string getter.
189         (WebCore::textTrackSubtitlesText): Ditto.
190         (WebCore::textTrackOffText): Ditto.
191         (WebCore::textTrackNoLabelText): Ditto.
192         * platform/LocalizedStrings.h:
193
194 2012-12-18  Beth Dakin  <bdakin@apple.com>
195
196         https://bugs.webkit.org/show_bug.cgi?id=102579
197         [mac] Enable scaled cursors
198
199         Reviewed by Dean Jackson.
200
201         Not much is required to get this turned on. We just need the feature to be 
202         defined, and we need to initialize m_imageScaleFactor in the Cursor constructors.
203
204         * Configurations/FeatureDefines.xcconfig:
205         * platform/mac/CursorMac.mm:
206         (WebCore::Cursor::Cursor):
207         (WebCore::Cursor::operator=):
208
209 2012-12-18  Joseph Pecoraro  <pecoraro@apple.com>
210
211         [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)
212         https://bugs.webkit.org/show_bug.cgi?id=104279
213
214         Reviewed by David Kilzer.
215
216         Set the executable as an input path on the check-* build phases.
217         
218         * WebCore.xcodeproj/project.pbxproj:
219
220 2012-12-18  Adam Klein  <adamk@chromium.org>
221
222         [HTMLTemplateElement] Prevent first-level recursive <template> from resetting the implied context
223         https://bugs.webkit.org/show_bug.cgi?id=104142
224
225         Reviewed by Eric Seidel.
226
227         This patch adds a stack of InsertionModes retains the chosen
228         "implied context" for each template element.
229
230         Based on a patch by Rafael Weinstein.
231
232         Tests added to html5lib/run-template.html
233
234         * html/parser/HTMLTreeBuilder.cpp:
235         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder): Initialize the stack appropriately for HTMLTemplateElement.innerHTML.
236         (WebCore::HTMLTreeBuilder::processTemplateStartTag):
237         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
238         (WebCore::HTMLTreeBuilder::processStartTag): Once we've figured out the insertion mode for a given <template> store it in the stack.
239         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
240         (WebCore::HTMLTreeBuilder::processEndTag):
241         (WebCore::HTMLTreeBuilder::processEndOfFile): Clear the stack if we hit end of file to allow the assertion in finish().
242         (WebCore::HTMLTreeBuilder::finished):
243         * html/parser/HTMLTreeBuilder.h:
244         (HTMLTreeBuilder):
245
246 2012-12-18  Andrew Lo  <anlo@rim.com>
247
248         [BlackBerry] Use midpoint for fixed position heuristic
249         https://bugs.webkit.org/show_bug.cgi?id=105329
250
251         Reviewed by Rob Buis.
252         Internally reviewed by Joe Mason.
253
254         Use the midpoint of the layer when determining whether the
255         fixed-position layer is on the top or bottom half of the screen
256         rather than the top of the layer.
257         Internal PR 237073.
258
259         No new tests are needed.
260
261         * platform/graphics/blackberry/LayerRenderer.cpp:
262         (WebCore::LayerRenderer::updateLayersRecursive):
263
264 2012-12-18  Andrew Lo  <anlo@rim.com>
265
266         [BlackBerry] Fixed position elements should be fixed position on x axis
267         https://bugs.webkit.org/show_bug.cgi?id=105333
268
269         Reviewed by Rob Buis.
270         Internally reviewed by Joe Mason.
271
272         Have fixed position elements be fixed on the X axis as well as Y.
273         This better aligns with what other ports are doing.
274         Internal PR237073.
275
276         No new tests are needed.
277
278         * platform/graphics/blackberry/LayerRenderer.cpp:
279         (WebCore::LayerRenderer::updateLayersRecursive):
280
281 2012-12-18  James Simonsen  <simonjam@chromium.org>
282
283         [Resource Timing] Populate responseEnd on cross-origin requests
284         https://bugs.webkit.org/show_bug.cgi?id=105231
285
286         Reviewed by Tony Gentilcore.
287
288         No new tests. Covered by existing cross-origin test, but masked by iframe bug.
289
290         * page/PerformanceResourceTiming.cpp:
291         (WebCore::PerformanceResourceTiming::responseEnd):
292
293 2012-12-18  Tim Horton  <timothy_horton@apple.com>
294
295         Unreviewed build fix after http://trac.webkit.org/changeset/138041
296
297         Need to cast int64_t to int32_t to avoid a warning on some compilers.
298
299         * platform/LayoutUnit.h:
300         (WebCore::boundedMultiply):
301
302 2012-12-18  Hans Muller  <hmuller@adobe.com>
303
304         [CSS Exclusions] shape-inside layout fails to adjust first line correctly for writing-mode: vertical-rl
305         https://bugs.webkit.org/show_bug.cgi?id=104419
306
307         Reviewed by Dirk Schulze.
308
309         ExclusionShapes no longer maintain a private "internal" coordinate system,
310         they're now defined in logical coordinates. The createExclusionShape() method
311         now handles the one-time conversion from physical to logical coordinates.
312
313         Test: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-003.html
314
315         * rendering/ExclusionPolygon.cpp:
316         (WebCore::ExclusionPolygon::getExcludedIntervals): Removed logical to internal coordinate conversions.
317         (WebCore::ExclusionPolygon::getIncludedIntervals): Ditto.
318         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Ditto.
319         * rendering/ExclusionPolygon.h:
320         * rendering/ExclusionRectangle.cpp:
321         (WebCore::ExclusionRectangle::getExcludedIntervals): Removed logical to internal coordinate conversions.
322         (WebCore::ExclusionRectangle::getIncludedIntervals): Ditto.
323         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): Ditto.
324         * rendering/ExclusionRectangle.h:
325         * rendering/ExclusionShape.cpp:
326         (WebCore::physicalRectToLogical): Convert a FloatRect defined with coordinates to logical coordinates.
327         (WebCore::physicalPointToLogical): Similar.
328         (WebCore::physicalSizeToLogical): Simlar.
329         (WebCore::ExclusionShape::createExclusionShape): Convert shapes from physical to logical coordinates.
330         * rendering/ExclusionShape.h:
331         (ExclusionShape): Removed internal to logical coordinate conversion utility methods.
332
333 2012-12-17  Emil A Eklund  <eae@chromium.org>
334
335         Optimize LayoutUnit::boundedMultiply
336         https://bugs.webkit.org/show_bug.cgi?id=105216
337
338         Reviewed by Levi Weintraub.
339
340         LayoutUnit::boundedMultiply is used for multiplication that's
341         prone to overflow and for all LayoutUnit multiplication if
342         SATURATED_LAYOUT_ARITHMETIC is enabled. The current approach is
343         quite inefficient.
344
345         Change it to use a more efficient saturated multiplication
346         implementation. As the implementation needs to use
347         kFixedPointDenominator it is implemented in LayoutUnit.h instead
348         of in wtf/SaturatedArithmetic.h.
349
350         Test: Covered by TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
351
352         * platform/LayoutUnit.h:
353         (WebCore::boundedMultiply):
354
355 2012-12-18  Bear Travis  <betravis@adobe.com>
356
357         [CSS Exclusions] Blocks should not re-use their parent's ExclusionShapeInsideInfo
358         if they participate in inline layout
359         https://bugs.webkit.org/show_bug.cgi?id=104582
360
361         Reviewed by Julien Chaffraix.
362
363         Blocks that participate in inline layout should not re-use a parent's
364         ExclusionShapeInsideInfo, as the parent and child would both use the info for
365         layout at the same time. This patch alters LayoutState to not include
366         ExclusionShapeInsideInfo if the current block participates in inline layout (ie,
367         it is a float, inline-block, or inline-table).
368
369         Test: fast/exclusions/shape-inside/shape-inside-recursive-layout.html
370
371         * rendering/ExclusionShapeInsideInfo.h:
372         (WebCore::ExclusionShapeInsideInfo::ownerBlock): Return the block associated with
373         the shape-inside style.
374         * rendering/LayoutState.cpp:
375         (WebCore::LayoutState::LayoutState): Do not re-use ExclusionShapeInsideInfo
376         on a block that participates in inline layout (floats and inline blocks).
377         * rendering/RenderBlock.h:
378         (WebCore::RenderBlock::allowsExclusionShapeInsideInfoSharing): Returns whether the
379         block can re-use an ExclusionShapeInsideInfo from its parent block.
380         * rendering/RenderBlockLineLayout.cpp:
381         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Adding an assert to make sure
382         we do not overwrite ExclusionShapeInsideInfo's state during a recursive layout.
383         * rendering/RenderView.h:
384         (WebCore::RenderView::pushLayoutState): Push a new LayoutState in the case that
385         ExclusionShapeInsideInfo exists but should not be propagated.
386
387 2012-12-18  Tony Chang  <tony@chromium.org>
388
389         REGRESSION(r136324): flex items with percent heights not resizing
390         https://bugs.webkit.org/show_bug.cgi?id=105213
391
392         Reviewed by Ojan Vafai.
393
394         We were missing some of the logic for when to relayout a flex child. Refactor
395         the code in RenderBlock::layoutBlockChildren so we can use it in RenderFlexibleBox.
396
397         Test: css3/flexbox/flexitem-percent-height-change.html
398
399         * rendering/RenderBlock.cpp:
400         (WebCore::RenderBlock::updateNeedsLayoutAndPreferredLogicalWidthsDirtyBeforeBlockChildLayout):
401         Pull out logic needed by RenderFlexibleBox.
402         (WebCore::RenderBlock::layoutBlockChildren): Use helper method.
403         * rendering/RenderBlock.h:
404         (RenderBlock): Add updateNeedsLayoutAndPreferredLogicalWidthsDirtyBeforeBlockChildLayout.
405         * rendering/RenderFlexibleBox.cpp:
406         (WebCore::RenderFlexibleBox::layoutBlock): Pass through relayoutChildren bool.
407         (WebCore::RenderFlexibleBox::layoutFlexItems): Pass through relayoutChildren and mark the child as needing
408         layout if it has a percent height.
409         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): We need to always layout here since we're
410         trying to get the preferred size.
411         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
412         * rendering/RenderFlexibleBox.h:
413
414 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
415
416         Fix position:-webkit-sticky behavior when zoomed
417         https://bugs.webkit.org/show_bug.cgi?id=105251
418
419         Reviewed by Dean Jackson.
420
421         Position sticky elements were misplaced when stickily-constrained, under zooming.
422         The cause was that some of the functions used to compute sticky position
423         took page scale into account, and some did not.
424         
425         Fix by using localToContainerQuad(..., view()) to compute RenderView-relative
426         quads, which avoids page scale, so all the constraints math is done ignoring
427         page scale. This also requires that we compute a scale-free viewport rect
428         in stickyPositionOffset().
429
430         Test: fast/css/sticky/sticky-top-zoomed.html
431
432         * rendering/RenderBoxModelObject.cpp:
433         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
434         (WebCore::RenderBoxModelObject::stickyPositionOffset):
435
436 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
437
438         Web Inspector: DataGrid cell values are "clipped" in editing mode.
439         https://bugs.webkit.org/show_bug.cgi?id=105277
440
441         Reviewed by Pavel Feldman.
442
443         UIUtils expects that "text-overflow" is not "ellipsis".
444
445         * inspector/front-end/dataGrid.css:
446         (.data-grid td.editing > div): Override text-overflow for editing mode.
447
448 2012-12-18  Ken Kania  <kkania@chromium.org>
449
450         [Inspector] Add frameId for frame owner nodes.
451         https://bugs.webkit.org/show_bug.cgi?id=105317
452
453         Reviewed by Pavel Feldman.
454
455         This is needed to translate from a node ID to the execution context ID for
456         evaluating scripts in the associated frame.
457
458         * inspector/Inspector.json:
459         * inspector/InspectorDOMAgent.cpp:
460         (WebCore::InspectorDOMAgent::buildObjectForNode):
461
462 2012-12-18  peavo@outlook.com  <peavo@outlook.com>
463
464         [WinCairo] Compile fix.
465         https://bugs.webkit.org/show_bug.cgi?id=105175
466
467         Reviewed by Simon Fraser.
468
469         * rendering/RenderLayer.h: Compile fixes for USE(ACCELERATED_COMPOSITING) mismatch.
470
471 2012-12-18  Emil A Eklund  <eae@chromium.org>
472
473         Have kFixedPointDenominator be constant across ports
474         https://bugs.webkit.org/show_bug.cgi?id=104843
475
476         Reviewed by Julien Chaffraix.
477
478         Currently the kFixedPointDenominator constant is set to either
479         64 or 1 depending on the SUBPIXEL_LAYOUT flag. As this constant
480         is used to limit the range of supported values this results in
481         inconsistencies across ports.
482
483         Change kFixedPointDenominator to always be 64 and introduce a
484         new constant (kEffectiveFixedPointDenominator) that varies.
485         This ensures that the same range of values are supported across
486         ports regardless of the SUBPIXEL_LAYOUT flag.
487         
488         Covered by fast/css/large-numbers.html and fast/css/large-number-round-trip.html
489
490         * platform/LayoutUnit.h:
491         Add kEffectiveFixedPointDenominator constant and change
492         LayoutUnit code to use it instead of kFixedPointDenominator
493         which is now set to 64 regardless of the SUBPIXEL_LAYOUT flag.
494
495 2012-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
496
497         Unreviewed, rolling out r137979.
498         http://trac.webkit.org/changeset/137979
499         https://bugs.webkit.org/show_bug.cgi?id=105311
500
501         nodeName returned by the inspector protocol commands should
502         match one accessible fro JS (Requested by yurys_ on #webkit).
503
504         * inspector/InspectorDOMAgent.cpp:
505         (WebCore::InspectorDOMAgent::buildObjectForNode):
506
507 2012-12-18  Alexander Pavlov  <apavlov@chromium.org>
508
509         Web Inspector: [Styles] Selector matches are not marked after property editing
510         https://bugs.webkit.org/show_bug.cgi?id=105284
511
512         Reviewed by Vsevolod Vlasov.
513
514         Once a property edit is committed, the selector markup is reset and needs to be re-applied.
515
516         * inspector/front-end/StylesSidebarPane.js:
517         (WebInspector.StylePropertiesSection.prototype.update):
518
519 2012-12-18  Eric Carlson  <eric.carlson@apple.com>
520
521         Add in-band text track cues only once
522         https://bugs.webkit.org/show_bug.cgi?id=104593
523
524         Reviewed by Dean Jackson.
525
526         Test: media/track/track-in-band-cues-added-once.html
527
528         * html/track/InbandTextTrack.cpp:
529         (WebCore::InbandTextTrack::hasCue): New.
530         * html/track/InbandTextTrack.h:
531
532         * html/track/TextTrackCue.cpp:
533         (WebCore::TextTrackCue::setCueSettings): Remember the raw cue settings so they can be accessed later.
534         * html/track/TextTrackCue.h:
535
536         * platform/graphics/InbandTextTrackPrivateClient.h: Declare hasCue.
537
538         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
539         (WebCore::InbandTextTrackPrivateAVF::processCue): Early return if m_player has been cleared.
540         (WebCore::InbandTextTrackPrivateAVF::setMode): Ditto.
541
542         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
543         (WebCore::MediaPlayerPrivateAVFoundation::seek): Clear the partially accumulated cue when the seek 
544             starts, not when it completes.
545         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
546         (WebCore::MediaPlayerPrivateAVFoundation::flushCurrentCue): Don't add a cue if it is already in the
547             text track cue list.
548         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
549         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearTextTracks): Drive-by cleanup, clear the track list completely.
550
551 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
552
553         Web Inspector: [Network] Ordering of cookies displayed is nondeterministic.
554         https://bugs.webkit.org/show_bug.cgi?id=105272
555
556         Reviewed by Vsevolod Vlasov.
557
558         This patch fixes double-selection of request and sets default ordering
559         of cookies.
560
561         * inspector/front-end/CookiesTable.js: By default sort by name.
562         * inspector/front-end/NetworkPanel.js: Do not fire "select" on
563         mouse-click in viewing-request mode.
564
565 2012-12-18  Alexander Pavlov  <apavlov@chromium.org>
566
567         Unreviewed, rolling out r138011.
568         http://trac.webkit.org/changeset/138011
569         https://bugs.webkit.org/show_bug.cgi?id=105272
570
571         WebInspector: Broke request selection in the Network panel
572
573         * inspector/front-end/CookiesTable.js:
574         (WebInspector.CookiesTable):
575         * inspector/front-end/NetworkPanel.js:
576         (WebInspector.NetworkPanel.prototype._toggleGridMode):
577         (WebInspector.NetworkPanel.prototype._toggleViewingRequestMode):
578         (WebInspector.NetworkDataGridNode.prototype.createCells):
579         (WebInspector.NetworkDataGridNode.prototype.get selectable):
580
581 2012-12-18  Nate Chapin  <japhet@chromium.org>
582
583         REGRESSION (r137607): Cannot download files, stuck in “Preparing to download”
584         https://bugs.webkit.org/show_bug.cgi?id=105044
585
586         Reviewed by Antti Koivisto.
587
588         The work done by DocumentLoader::mainReceivedError() changed subtly in r137607,
589         such that it cancels the ResourceHandle. We want to treat switching to a download
590         like a failure, where WebCore assumes that the load is finished, and no
591         cancellation is required.
592
593         No new tests, tested manually by verifying that downloading files works in
594         Safari Mac.
595
596         * loader/MainResourceLoader.cpp:
597         (WebCore::MainResourceLoader::continueAfterContentPolicy):
598         * platform/network/mac/ResourceHandleMac.mm:
599         (WebCore::ResourceHandle::cancel): Remove the workaround added in r137763.
600
601 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
602
603         Web Inspector: [Network] Ordering of cookies displayed is nondeterministic.
604         https://bugs.webkit.org/show_bug.cgi?id=105272
605
606         Reviewed by Alexander Pavlov.
607
608         This patch fixes double-selection of request and sets default ordering
609         of cookies.
610
611         * inspector/front-end/CookiesTable.js: By default sort by name.
612         * inspector/front-end/NetworkPanel.js: Remove redundant member, make
613         rows "not-selectable", activate request selection on "mouse-down".
614
615 2012-12-18  Tommy Widenflycht  <tommyw@chromium.org>
616
617         [JSC] Refactoring CodeGeneratorJS.pm to simplify adding support for overloaded constructors
618         https://bugs.webkit.org/show_bug.cgi?id=105271
619
620         Reviewed by Kentaro Hara.
621
622         This patch splits the very large function that generates constructor code into a few smaller ones.
623         No changes in actual generated code but some functions in the generated bindings code moves.
624
625         Existing tests cover patch.
626
627         * bindings/scripts/CodeGeneratorJS.pm:
628         (GenerateImplementation):
629         (GenerateConstructorDefinitions):
630         (GenerateConstructorDefinition):
631         (GenerateConstructorSupportDefinitions):
632         (IsCustomConstructable):
633         (IsConstructable):
634         * bindings/scripts/test/JS/JSFloat64Array.cpp:
635         (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
636         (WebCore):
637         (WebCore::toJS):
638         (WebCore::JSFloat64Array::indexSetter):
639         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
640         (WebCore):
641         (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
642         (WebCore::JSTestEventConstructorConstructor::finishCreation):
643         (WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot):
644         (WebCore::JSTestEventConstructorConstructor::getOwnPropertyDescriptor):
645         * bindings/scripts/test/JS/JSTestInterface.cpp:
646         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
647         (WebCore):
648         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
649         (WebCore):
650         (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
651         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
652         * bindings/scripts/test/JS/JSTestNode.cpp:
653         (WebCore::JSTestNodeConstructor::constructJSTestNode):
654         (WebCore):
655         * bindings/scripts/test/JS/JSTestObj.cpp:
656         (WebCore::JSTestObjConstructor::constructJSTestObj):
657         (WebCore):
658         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
659         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
660         (WebCore):
661         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
662         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
663         (WebCore):
664
665 2012-12-18  Max Feil  <mfeil@rim.com>
666
667         [BlackBerry] Add support for setMuted() for media
668         https://bugs.webkit.org/show_bug.cgi?id=105254
669
670         Reviewed by George Staikos.
671
672         Simply pass the API call through to the platform layer.
673
674         Covered by existing tests.
675
676         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
677         (WebCore::MediaPlayerPrivate::setMuted):
678         (WebCore):
679         (WebCore::MediaPlayerPrivate::muted):
680         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
681         (MediaPlayerPrivate):
682         (WebCore::MediaPlayerPrivate::supportsMuting):
683
684 2012-12-18  Yury Semikhatsky  <yurys@chromium.org>
685
686         Web Inspector: show cached images under MemoryCache -> Images section
687         https://bugs.webkit.org/show_bug.cgi?id=105261
688
689         Reviewed by Pavel Feldman.
690
691         Provided class name and name for several objects related to CachedImage.
692         Changed native memory snapsho view so that MemoryCache.Image section can
693         be expanded into individual images.
694
695         * inspector/front-end/NativeMemorySnapshotView.js:
696         (WebInspector.NativeMemorySnapshotView):
697         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
698         (WebInspector.NativeHeapGraphEdge):
699         (WebInspector.NativeHeapGraphEdge.prototype.type):
700         (WebInspector.NativeHeapGraphEdge.prototype.name):
701         (WebInspector.NativeHeapGraphEdge.prototype.target):
702         (WebInspector.NativeHeapGraphEdge.prototype._getStringField):
703         (WebInspector.NativeHeapGraphEdge.prototype.toString):
704         (WebInspector.NativeHeapGraphNode.prototype.size):
705         (WebInspector.NativeHeapGraphNode.prototype.referencedNodes):
706         (WebInspector.NativeHeapGraphNode.prototype.outgoingEdges):
707         (WebInspector.NativeHeapGraphNode.prototype.targetOfEdge):
708         (WebInspector.NativeHeapGraphNode.prototype.targetsOfAllEdges):
709         (WebInspector.NativeHeapGraphNode.prototype._firstEdgePoistion):
710         (WebInspector.NativeHeapGraphNode.prototype._afterLastEdgePosition):
711         (WebInspector.NativeHeapGraphNode.prototype._getStringField):
712         (WebInspector.NativeHeapGraphNode.prototype.toString):
713         (WebInspector.NativeHeapGraph):
714         (WebInspector.NativeHeapGraph.prototype.rootNodes):
715         (WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
716         (WebInspector.NativeHeapGraph.prototype._addDummyNode):
717         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
718         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
719         * loader/cache/CachedImage.cpp:
720         (WebCore::CachedImage::reportMemoryUsage):
721         * loader/cache/CachedResource.cpp:
722         (WebCore::CachedResource::reportMemoryUsage):
723         * loader/cache/MemoryCache.cpp:
724         (WebCore::MemoryCache::reportMemoryUsage):
725         * platform/graphics/BitmapImage.cpp:
726         (WebCore::BitmapImage::reportMemoryUsage):
727         (WebCore::FrameData::reportMemoryUsage):
728         * platform/graphics/Image.cpp:
729         (WebCore::Image::reportMemoryUsage):
730         * platform/graphics/skia/MemoryInstrumentationSkia.cpp:
731         (reportMemoryUsage):
732
733 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
734
735         Web Inspector: Calculate "idle" time for CPU profiles.
736         https://bugs.webkit.org/show_bug.cgi?id=103120
737
738         Reviewed by Pavel Feldman.
739
740         CPU profiles contain a very confusing "(program)" item.
741         It is time when there is no JS stack.
742         That could be either idle time, or time when browser is doing something.
743
744         To split "(program)" item to idle and really program time we are to
745         calculate idle time during profiling.
746
747         * bindings/js/ScriptProfile.cpp: Added "idleTime" getter.
748         * bindings/js/ScriptProfile.h: Ditto.
749         * bindings/js/ScriptProfiler.h:
750         Added getter of thread-local map of currently written profiles.
751         * bindings/v8/ScriptProfile.cpp: Added "idleTime" getter.
752         * bindings/v8/ScriptProfile.h: Ditto.
753         * bindings/v8/ScriptProfiler.cpp:
754         (WebCore::ScriptProfiler::start): Put profile name to map.
755         (WebCore::ScriptProfiler::stop): Remove profile name from map;
756         pass idleTime to profile constructor.
757         * bindings/v8/ScriptProfiler.h:
758         Added getter of thread-local map of currently written profiles.
759         * inspector/Inspector.json: Added "idleTime" field to profile.
760         * inspector/InspectorController.cpp: Pass hooks to profiler agent.
761         * inspector/InspectorProfilerAgent.cpp:
762         Add idle time to currently written profiles.
763         * inspector/InspectorProfilerAgent.h:
764         Added member to hold reference to map of currently written profiles.
765         * inspector/InspectorTimelineAgent.h:
766         Cleanup.
767         * inspector/ScriptProfile.idl:
768         Add "idleTime" member.
769
770 2012-12-17  Yury Semikhatsky  <yurys@chromium.org>
771
772         Web Inspector: MediaQueryList listener silently catches errors
773         https://bugs.webkit.org/show_bug.cgi?id=105162
774
775         Reviewed by Alexander Pavlov.
776
777         Drive-by: removed unused ScriptCallback::call(bool).
778
779         Test: inspector-protocol/media-query-listener-exception.html
780
781         * bindings/js/ScriptFunctionCall.cpp:
782         (WebCore::ScriptCallback::call):
783         * bindings/js/ScriptFunctionCall.h:
784         (ScriptCallback):
785         * bindings/v8/ScriptFunctionCall.cpp: report uncaught exception to the inspector
786         if it was thrown during the function call.
787         (WebCore::ScriptCallback::call):
788         * bindings/v8/ScriptFunctionCall.h:
789         (ScriptCallback):
790
791 2012-12-18  Eugene Klyuchnikov  <eustas@chromium.org>
792
793         Web Inspector: Network: display JavaScript stack in case of script initiator.
794         https://bugs.webkit.org/show_bug.cgi?id=104899
795
796         Reviewed by Vsevolod Vlasov.
797
798         Show popup with navigavle stack-trace.
799
800         * inspector/front-end/NetworkPanel.js:
801         (WebInspector.NetworkLogView.prototype._getPopoverAnchor):
802         Added new target.
803         (WebInspector.NetworkLogView.prototype._showPopover):
804         Added case for new target.
805         (WebInspector.NetworkLogView.prototype._generateScriptInitiatedPopoverContent):
806         Generates table with stack trace items.
807         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
808         Added target marker, removed annoying titles.
809
810 2012-12-18  Tamas Czene  <tczene@inf.u-szeged.hu>
811
812         Style fix to OpenCL SVG Filters
813         https://bugs.webkit.org/show_bug.cgi?id=105265
814
815         Reviewed by Zoltan Herczeg.
816
817         Inserted missing spaces and correct copyright text. There were no vital changes.
818
819         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
820         (WebCore):
821         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
822         (FilterContextOpenCL):
823         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
824         (WebCore::FilterContextOpenCL::applyFEColorMatrix):
825         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
826         (WebCore):
827         (WebCore::FilterContextOpenCL::compileFETurbulence):
828         (WebCore::FilterContextOpenCL::applyFETurbulence):
829         (WebCore::FETurbulence::platformApplyOpenCL):
830         * platform/graphics/gpu/opencl/OpenCLHandle.h:
831
832 2012-12-17  Andrey Adaikin  <aandrey@chromium.org>
833
834         Web Inspector: [WebGL] handle video elements used in WebGL
835         https://bugs.webkit.org/show_bug.cgi?id=105170
836
837         Reviewed by Yury Semikhatsky.
838
839         Copy current image of video elements into a canvas to use it later in the replay.
840
841         * inspector/InjectedScriptCanvasModuleSource.js:
842         (.):
843
844 2012-12-17  Luke Macpherson   <macpherson@chromium.org>
845
846         Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables.
847         https://bugs.webkit.org/show_bug.cgi?id=104876
848
849         Reviewed by Steve Block.
850
851         Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that
852         the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing
853         here will produce a more useful backtrace.
854
855         No new tests as functionality unchanged.
856
857         * css/CSSProperty.h:
858         (WebCore::CSSProperty::CSSProperty):
859
860 2012-12-17  Vsevolod Vlasov  <vsevik@chromium.org>
861
862         Web Inspector: Make inspector scripts sourceURL absolute.
863         https://bugs.webkit.org/show_bug.cgi?id=105166
864
865         Reviewed by Yury Semikhatsky.
866
867         * inspector/front-end/utilities.js:
868
869 2012-12-17  Huang Dongsung  <luxtella@company100.net>
870
871         REGRESSION(r137442): Crash because of an uninitialized member.
872         https://bugs.webkit.org/show_bug.cgi?id=105246
873
874         Reviewed by Noam Rosenthal.
875
876         TextureMapperGL defines m_context although TextureMapper defines m_context.
877         r137442 removes the initialization code in TextureMapperGL, which is
878         what causes this regression. This patch removes the duplicated member
879         in TextureMapperGL.
880
881         No new tests. Covered by existing tests.
882
883         * platform/graphics/texmap/TextureMapper.cpp:
884         (WebCore::TextureMapper::TextureMapper):
885         * platform/graphics/texmap/TextureMapper.h:
886         (WebCore::TextureMapper::setGraphicsContext):
887         (WebCore::TextureMapper::graphicsContext):
888         (TextureMapper):
889         * platform/graphics/texmap/TextureMapperGL.h:
890         (WebCore):
891
892 2012-12-17  Philip Rogers  <pdr@google.com>
893
894         Queue container size requests while images are loading.
895         https://bugs.webkit.org/show_bug.cgi?id=105097
896
897         Reviewed by Dean Jackson.
898
899         We use CachedImage::setContainerSizeForRenderer(...) to notify images of requesting
900         container sizes. Unfortunately, if the image is not yet loaded we ignore this container
901         size information! This patch stores requesting container sizes made while the image is
902         not yet loaded.
903
904         This patch fixes a bug where SVG images would display incorrectly on the first load but
905         correctly thereafter. Additionally, this bug caused the SVGImageCache to not be used in many
906         real world scenarios.
907
908         This patch is loosely based on a patch by blambov in WK98403.
909
910         Test: http/tests/misc/svg-image-delayed-size-negotiation.html
911
912         * loader/cache/CachedImage.cpp:
913         (WebCore::CachedImage::didRemoveClient):
914         (WebCore::CachedImage::allClientsRemoved):
915         (WebCore::CachedImage::setContainerSizeForRenderer):
916         (WebCore::CachedImage::clear):
917         (WebCore::CachedImage::createImage):
918         * loader/cache/CachedImage.h:
919
920             A new map has been added to track renderer -> size information before an image has
921             loaded. Note that this affects all images (not just images that require container size
922             information) but we cannot know the image type before the image has loaded.
923
924 2012-12-17  Shinya Kawanaka  <shinyak@chromium.org>
925
926         Web Inspector: need to visually distinguish UA shadow roots
927         https://bugs.webkit.org/show_bug.cgi?id=104877
928
929         Reviewed by Yury Semikhatsky.
930
931         Now we have an option to show ShadowRoot in the Inspector. Since the Inspector has displayed UserAgent ShadowRoot and
932         Author ShadowRoot as the same #shadow-root, a user could not distinguish them.
933
934         We would like to show UserAgent ShadowRoot as #webkit-shadow-root.
935
936         Test: inspector/shadow-root.html
937
938         * inspector/InspectorDOMAgent.cpp:
939         (WebCore::InspectorDOMAgent::buildObjectForNode): Make nodeName of UserAgent ShadowRoot #webkit-shadow-root.
940         Since the correct nodeName of ShadowRoot is #document-fragment, we have to specify the nodeName of Author ShadowRoot
941         as #shadow-root here.
942
943 2012-12-17  Huang Dongsung  <luxtella@company100.net>
944
945         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
946         https://bugs.webkit.org/show_bug.cgi?id=103959
947
948         Reviewed by Kenneth Rohde Christiansen.
949
950         TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop() is used when class
951         methods cannot be called asynchronously by client. Updates of tiles are
952         committed as soon as all the events in event queue have been processed.
953         After this patch Frame sets m_commitTileUpdatesOnIdleEventLoop to true.
954
955         In addition, remove TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed()
956         which was introduced for Coordinated Graphics.
957
958         Refactoring covered by existing tests.
959
960         * page/Frame.cpp:
961         (WebCore::Frame::setTiledBackingStoreEnabled):
962         * platform/graphics/TiledBackingStore.cpp:
963         (WebCore::TiledBackingStore::TiledBackingStore):
964         (WebCore::TiledBackingStore::setTrajectoryVector):
965           Separate setting a trajectory vector from coverWithTilesIfNeeded().
966         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
967         (WebCore::TiledBackingStore::updateTileBuffers):
968         (WebCore::TiledBackingStore::createTiles):
969         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
970         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
971         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
972         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
973         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
974         * platform/graphics/TiledBackingStore.h:
975         (TiledBackingStore):
976         (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop):
977         * platform/graphics/TiledBackingStoreClient.h:
978         (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
979             If TiledBackingStore does not create all tiles, TiledBackingStore
980             notifies a client of needing to create tiles more, when
981             m_commitTileUpdatesOnIdleEventLoop is false.
982
983 2012-12-17  Dean Jackson  <dino@apple.com>
984
985         Track menu should be sorted
986         https://bugs.webkit.org/show_bug.cgi?id=105229
987
988         Reviewed by Eric Carlson.
989
990         Make sure that the <li> elements in the track menu are correctly
991         sorted as they are built. This uses insertion sort, but it shouldn't
992         be horrible given that we don't expect a huge number of tracks.
993
994         Test: media/video-controls-captions-trackmenu-sorted.html
995
996         * html/shadow/MediaControlElements.cpp:
997         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
998         (WebCore::insertTextTrackMenuItemIntoSortedContainer): New function that calls insertBefore with
999         the correct parameters to ensure the <ul> is correctly sorted.
1000         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
1001         * html/shadow/MediaControlElements.h:
1002         (MediaControlClosedCaptionsTrackListElement): Rename menuItems to m_menuItems for consistency.
1003
1004 2012-12-17  Matthew Dempsky  <mdempsky@google.com>
1005
1006         Regression causing DOM objects to have unstable NPObject* references with v8 bindings
1007         https://bugs.webkit.org/show_bug.cgi?id=104921
1008
1009         Reviewed by Kentaro Hara.
1010
1011         Fix regression introduced by changeset 135804 resulting in
1012         unstable NPObject* references for v8 objects.  In the iter !=
1013         v8NPObjectMap->end() code path, objectVector was left unassigned
1014         if the for loop terminated without returning.
1015
1016         Also, V8Object::GetIdentityHash() is documented as not being guaranteed
1017         as unique.  As such, don't ASSERT() that two objects with the same hash
1018         must therefor be the same object.
1019
1020         Tests: plugins/npruntime/embed-property-iframe-equality.html
1021
1022         * bindings/v8/NPV8Object.cpp:
1023         (WebCore::npCreateV8ScriptObject): Fix.
1024
1025 2012-12-17  Chris Fleizach  <cfleizach@apple.com>
1026
1027         Seamless iframe should not announce a new browsing context
1028         https://bugs.webkit.org/show_bug.cgi?id=86317
1029
1030         Reviewed by Eric Seidel.
1031
1032         Introduce a new role for seamless frames so that the platforms can decide what to do
1033         with this kind of object. For the mac, it's exposed as a group.
1034
1035         Test: platform/mac/accessibility/seamless-iframe.html
1036
1037         * accessibility/AccessibilityNodeObject.cpp:
1038         (WebCore):
1039         * accessibility/AccessibilityNodeObject.h:
1040         (AccessibilityNodeObject):
1041         * accessibility/AccessibilityObject.h:
1042         (WebCore::AccessibilityObject::isWebArea):
1043         (WebCore::AccessibilityObject::isSeamlessWebArea):
1044         * accessibility/AccessibilityRenderObject.cpp:
1045         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
1046         (WebCore::AccessibilityRenderObject::parentObject):
1047         (WebCore::AccessibilityRenderObject::boundingBoxRect):
1048         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1049         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1050         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1051         (createAccessibilityRoleMap):
1052
1053 2012-12-17  KyungTae Kim  <ktf.kim@samsung.com>
1054
1055         Percentage width replaced element incorrectly rendered when intrinsic size changed
1056         https://bugs.webkit.org/show_bug.cgi?id=102784
1057
1058         Reviewed by Tony Chang.
1059
1060         To make relayout when the image dimension is changed,
1061         and if the logical width is percent type and the containing block fits to it.
1062         In this case, the containing block's width need to be updated first,
1063         because the 'newWidth' was calculated from the 'old containing block width'.
1064
1065         Test: fast/css/percent-width-img-src-change.html
1066
1067         * rendering/RenderImage.cpp:
1068         (WebCore::RenderImage::imageDimensionsChanged):
1069
1070 2012-12-17  Beth Dakin  <bdakin@apple.com>
1071
1072         DidHitRelevantRepaintedObjectsAreaThreshold should not use the viewRect since 
1073         that varies
1074         https://bugs.webkit.org/show_bug.cgi?id=105116
1075         -and corresponding-
1076         <rdar://problem/12889449>
1077
1078         Reviewed by Geoff Garen.
1079
1080         DidHitRelevantRepaintedObjectsAreaThreshold should not use the viewRect since that 
1081         varies depending on window size. This can lead to a huge amount of variability in 
1082         the heuristic which is not desired. Instead, we should use a hard-coded rect.
1083         * page/Page.cpp:
1084         (WebCore::relevantViewRect):
1085         (WebCore):
1086         (WebCore::Page::addRelevantRepaintedObject):
1087         (WebCore::Page::addRelevantUnpaintedObject):
1088
1089 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
1090
1091         Fix repositioning of fixed elements on zooming
1092         https://bugs.webkit.org/show_bug.cgi?id=105223
1093
1094         Reviewed by Beth Dakin.
1095
1096         When zoomed, scrolling would move the layers of fixed-position
1097         elements oddly. This happened because on the scrolling thread we
1098         passed a scale of 1, rather than the actual page scale to 
1099         scrollOffsetForFixedPosition().
1100         
1101         Fix by plumbing the page scale through the scrolling state node
1102         to the scrolling node.
1103
1104         Test: platform/mac/tiled-drawing/fixed/four-bars-zoomed.html
1105
1106         * page/scrolling/ScrollingStateScrollingNode.cpp:
1107         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1108         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor):
1109         (WebCore::ScrollingStateScrollingNode::dumpProperties):
1110         * page/scrolling/ScrollingStateScrollingNode.h:
1111         (WebCore::ScrollingStateScrollingNode::frameScaleFactor):
1112         (ScrollingStateScrollingNode):
1113         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1114         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
1115         (WebCore::ScrollingTreeScrollingNode::update):
1116         * page/scrolling/ScrollingTreeScrollingNode.h:
1117         (WebCore::ScrollingTreeScrollingNode::frameScaleFactor):
1118         (ScrollingTreeScrollingNode):
1119         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1120         (ScrollParameters):
1121         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1122         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1123         (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
1124         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1125         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1126
1127 2012-12-17  Dima Gorbik  <dgorbik@apple.com>
1128
1129         Implement matching cue by the class name with ::cue pseudo element
1130         https://bugs.webkit.org/show_bug.cgi?id=104191
1131
1132         Reviewed by Antti Koivisto.
1133
1134         Implemented the ::cue() pseudo-element with an argument that may hold a simple selector list.
1135         This enables matching cue objects by the class name.
1136
1137         Test: media/track/track-css-matching.html
1138
1139         * css/CSSGrammar.y.in: support parsing the ::cue() with an argument.
1140         * css/CSSParser.cpp:
1141         (WebCore::CSSParser::detectFunctionTypeToken): tokenize the 'cue'.
1142         (WebCore::CSSParser::updateSpecifiersWithElementName): do not set the tag for the cue pseudo-element because
1143         the ::cue may match elements with different tags.
1144         (WebCore::CSSParser::updateSpecifiers): the behavior for the PseudoCue selector should be same as for
1145         unknown pseudo elements - the pseudo-element should stay on top of the selector chain.
1146         * css/CSSSelector.cpp: added the type detection for the new selector.
1147         (WebCore::CSSSelector::pseudoId):
1148         (WebCore::nameToPseudoTypeMap):
1149         (WebCore::CSSSelector::extractPseudoType):
1150         * css/CSSSelector.h:
1151         * css/RuleSet.cpp: add a new list to hold all the rulesets for the new pseudo element.
1152         (WebCore::RuleSet::reportMemoryUsage):
1153         (WebCore::RuleSet::addRule):
1154         (WebCore::RuleSet::shrinkToFit):
1155         * css/RuleSet.h:
1156         (RuleSet):
1157         (WebCore::RuleSet::cuePseudoRules):
1158         * css/SelectorChecker.cpp:
1159         (WebCore::SelectorChecker::checkOneSelector):
1160         * css/SelectorChecker.h:
1161         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1162         * css/StyleResolver.cpp:
1163         (WebCore::StyleResolver::collectMatchingRules):
1164         * dom/Element.cpp: an addition to the rare data to be able to find out if the node is a webvtt node.
1165         (WebCore):
1166         (WebCore::Element::isWebVTTNode):
1167         (WebCore::Element::setIsWebVTTNode):
1168         (WebCore::Element::cloneDataFromElement):
1169         * dom/Element.h:
1170         (Element):
1171         * dom/ElementRareData.h:
1172         (ElementRareData):
1173         * dom/NodeRareData.h:
1174         (WebCore::NodeRareData::NodeRareData):
1175         (NodeRareData):
1176         (WebCore::NodeRareData::isWebVTTNode):
1177         (WebCore::NodeRareData::setIsWebVTTNode):
1178         * html/track/TextTrackCue.cpp:
1179         (WebCore::TextTrackCue::markNodesAsWebVTTNodes): mark the cloned nodes as WebVTT nodes.
1180         (WebCore):
1181         (WebCore::TextTrackCue::getCueAsHTML):
1182         * html/track/TextTrackCue.h:
1183         (TextTrackCue):
1184         * html/track/WebVTTParser.cpp:
1185         (WebCore::WebVTTParser::constructTreeFromToken):
1186         * rendering/style/RenderStyleConstants.h:
1187
1188 2012-12-17  Michael Pruett  <michael@68k.org>
1189
1190         IndexedDB: Don't use strings to represent serialized values
1191         https://bugs.webkit.org/show_bug.cgi?id=104354
1192
1193         Reviewed by Kentaro Hara.
1194
1195         Use Vector<uint8_t> rather than String to represent serialized values
1196         in IndexedDB. This change is necessary to implement IndexedDB for JSC.
1197
1198         Tests: storage/indexeddb/*
1199
1200         * Modules/indexeddb/IDBBackingStore.cpp:
1201         (WebCore::IDBBackingStore::getRecord):
1202         (WebCore::IDBBackingStore::putRecord):
1203         (WebCore::ObjectStoreKeyCursorImpl::value):
1204         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
1205         (WebCore::ObjectStoreCursorImpl::value):
1206         (ObjectStoreCursorImpl):
1207         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
1208         (WebCore::IndexKeyCursorImpl::value):
1209         (WebCore::IndexCursorImpl::value):
1210         (WebCore::IndexCursorImpl::IndexCursorImpl):
1211         (IndexCursorImpl):
1212         (WebCore::IndexCursorImpl::loadCurrentRow):
1213         * Modules/indexeddb/IDBBackingStore.h:
1214         (IDBBackingStore):
1215         (Cursor):
1216         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1217         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
1218         * Modules/indexeddb/IDBCursorBackendImpl.h:
1219         (WebCore::IDBCursorBackendImpl::value):
1220         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1221         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
1222         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1223         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
1224         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
1225         * bindings/js/SerializedScriptValue.cpp:
1226         (WebCore::SerializedScriptValue::SerializedScriptValue):
1227         (WebCore):
1228         * bindings/js/SerializedScriptValue.h:
1229         * bindings/v8/SerializedScriptValue.cpp:
1230         (WebCore::SerializedScriptValue::createFromWireBytes):
1231         (WebCore):
1232         (WebCore::SerializedScriptValue::toWireBytes):
1233         * bindings/v8/SerializedScriptValue.h:
1234         (SerializedScriptValue):
1235
1236 2012-12-17  Jaehun Lim  <ljaehun.lim@samsung.com>
1237
1238         Change SET_VAR, SET_BORDERVALUE_COLOR macro to require semicolon(;) at the end of the line
1239         https://bugs.webkit.org/show_bug.cgi?id=104774
1240
1241         Reviewed by Eric Seidel.
1242
1243         Remove the last ; in SET_VAR, SET_BORDERVALUE_COLOR macro definition.
1244         Add the omitted ; in RenderStyle.h | .cpp
1245
1246         No new tests, just style change.
1247
1248         * rendering/style/RenderStyle.cpp:
1249         (WebCore::RenderStyle::setColor):
1250         (WebCore::RenderStyle::setVisitedLinkColor):
1251         (WebCore::RenderStyle::setHorizontalBorderSpacing):
1252         (WebCore::RenderStyle::setVerticalBorderSpacing):
1253         * rendering/style/RenderStyle.h:
1254
1255 2012-12-17  Yong Li  <yoli@rim.com>
1256
1257         [BlackBerry] Deadlock caused by PluginViewPrivate::destroyBuffers()
1258         https://bugs.webkit.org/show_bug.cgi?id=105215
1259
1260         Reviewed by Rob Buis.
1261         Also internally reviewed by George Staikos.
1262
1263         PR# 266443
1264         It should release mutexes before sending sync message.
1265
1266         * plugins/blackberry/PluginViewPrivateBlackBerry.cpp:
1267         (WebCore::PluginViewPrivate::destroyBuffers):
1268
1269 2012-12-17  Sheriff Bot  <webkit.review.bot@gmail.com>
1270
1271         Unreviewed, rolling out r137198.
1272         http://trac.webkit.org/changeset/137198
1273         https://bugs.webkit.org/show_bug.cgi?id=105212
1274
1275         This patch is causing API behavior compatibility problems
1276         (Requested by zdobersek on #webkit).
1277
1278         * platform/network/soup/ResourceRequestSoup.cpp:
1279         (WebCore::ResourceRequest::updateFromSoupMessage):
1280
1281 2012-12-17  Dominic Mazzoni  <dmazzoni@google.com>
1282
1283         AX: textUnderElement should consider alt text, but skip links and controls
1284         https://bugs.webkit.org/show_bug.cgi?id=101650
1285
1286         Reviewed by Chris Fleizach.
1287
1288         Getting inner text from an element now ignores focusable descendants
1289         and containers, but uses alternative text.  The computation of
1290         textUnderElement is now recursive and doesn't depend on text
1291         iterators, which might not do the right thing for accessibility
1292         anyways.
1293
1294         For GTK, the old behavior is retained so that support for
1295         the object replacement character is still there. Filed a new
1296         bug (105214) for GTK folks to look at this.
1297
1298         Test: accessibility/button-title-uses-inner-img-alt.html
1299         Test: accessibility/focusable-div.html
1300
1301         * accessibility/AccessibilityNodeObject.cpp:
1302         (WebCore):
1303         (WebCore::shouldUseAccessiblityObjectInnerText):
1304         (WebCore::AccessibilityNodeObject::textUnderElement):
1305         * accessibility/AccessibilityRenderObject.cpp:
1306         (WebCore::AccessibilityRenderObject::textUnderElement):
1307
1308 2012-12-17  Otto Derek Cheung  <otcheung@rim.com>
1309
1310         [BlackBerry] Prevent CookieManager from blocking the WKT thread
1311         https://bugs.webkit.org/show_bug.cgi?id=105111
1312
1313         Prevent CookieManager from blocking the WKT Thread.
1314
1315         PR 265603
1316
1317         Reviewed by Rob Buis.
1318
1319         Adding some guards to CookieManager so it will return immedately
1320         if getCookie functions are called when the database isn't loaded yet.
1321
1322         setCookie functions will be redispatched until the database is ready.
1323
1324         * platform/blackberry/CookieManager.cpp:
1325         (WebCore::CookieManager::CookieManager):
1326         (WebCore::CookieManager::setCookies):
1327         (WebCore::CookieManager::getCookie):
1328         (WebCore::CookieManager::generateHtmlFragmentForCookies):
1329         (WebCore::CookieManager::getRawCookies):
1330         (WebCore::CookieManager::removeAllCookies):
1331         (WebCore::CookieManager::getBackingStoreCookies):
1332         (WebCore::CookieManager::setPrivateMode):
1333         (WebCore::CookieManager::removeCookieWithName):
1334         * platform/blackberry/CookieManager.h:
1335
1336 2012-12-17  Levi Weintraub  <leviw@chromium.org>
1337
1338         Add support for tracking hit test rectangles to enable fast event rejection in the compositor
1339         https://bugs.webkit.org/show_bug.cgi?id=103914
1340
1341         Reviewed by James Robinson.
1342
1343         Adding support for tracking hit test target regions for the purpose of performing initial hit testing
1344         in the compositor to avoid blocking scrolling on the main thread while waiting to hit test events that
1345         aren't occuring in regions with handlers. This is initially being done to avoid having to go to the main
1346         thread when scrolling by flicking on touch devices when the flick occurs outside a tracked touch event
1347         region. This patch includes the implementation to turn this on in Chromium.
1348
1349         To accomplish this goal, Document will now keep a counted hash set of nodes with touch event handlers
1350         instead of only an unsigned integer of the total count. ScrollingCoordinator then updates the compositor
1351         when new touch event handlers are registered or removed, or after layout much like how
1352         nonFastScrollableRegions are currently tracked.
1353
1354         This implementation will not properly update the hit test rects when the renderers are inside a sub-
1355         tree that scrolls.
1356
1357         This change was initially rolled out due to stale Node pointers in Document's touchEventTargets. This
1358         patch adds a callback to remove the Node from that structure to Node's destructor. This is covered
1359         by the touch-target-removed-crash.html test case which is also added.
1360
1361         Test: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
1362               platform/chromium/fast/events/touch/touch-target-removed-crash.html
1363
1364         * dom/Document.cpp:
1365         (WebCore::Document::Document): Added a HashCountedSet of touch target nodes. Note: DOMWindow targets
1366         are stored as the Document they point to.
1367         (WebCore::Document::didAddTouchEventHandler): Changed to keep track of the handler instead of a count, and
1368         to update the ScrollingCoordinator with the change.
1369         (WebCore::Document::didRemoveTouchEventHandler): Ditto.
1370         * dom/Document.h:
1371         (WebCore::Document::hasTouchEventHandlers): It's no longer O(1) to get the count of touch handlers, so
1372         expose whether there are any or not.
1373         (WebCore::Document::touchEventTargets):
1374         * dom/Node.cpp:
1375         (WebCore::Node::didMoveToNewDocument):
1376         (WebCore::tryAddEventListener):
1377         (WebCore::tryRemoveEventListener):
1378         * history/CachedFrame.cpp:
1379         (WebCore::CachedFrameBase::restore):
1380         * html/HTMLInputElement.cpp:
1381         (WebCore::HTMLInputElement::~HTMLInputElement):
1382         (WebCore::HTMLInputElement::updateType):
1383         * page/DOMWindow.cpp:
1384         (WebCore::DOMWindow::addEventListener): Add the Document to the touch target set instead of DOMWindow.
1385         (WebCore::DOMWindow::removeEventListener):
1386         * page/EventHandler.cpp:
1387         (WebCore::EventHandler::handleTouchEvent):
1388         * page/Frame.cpp:
1389         (WebCore::Frame::setDocument):
1390         * page/scrolling/ScrollingCoordinator.cpp:
1391         (WebCore::ScrollingCoordinator::computeAbsoluteTouchEventTargetRects): Walk the renderers for event handler
1392         nodes and generate the absolute hit testing rects.
1393         * page/scrolling/ScrollingCoordinator.h:
1394         (WebCore::ScrollingCoordinator::setTouchEventTargetRectsChanged): Hook to pass along the hit test rects to
1395         the scrolling tree/compositor.
1396         (ScrollingCoordinator):
1397         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
1398         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
1399         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRectsChanged):
1400         (WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
1401         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRects):
1402         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
1403         (ScrollingCoordinatorChromium):
1404         * testing/Internals.cpp:
1405         (WebCore::Internals::touchEventHandlerCount): Changed to do the work to calculate the actual count since
1406         it's no longer stored as an int in Document.
1407         (WebCore::Internals::touchEventTargetClientRects):
1408         * testing/Internals.h:
1409         (Internals):
1410         * testing/Internals.idl:
1411
1412 2012-12-17  Avi Drissman  <avi@chromium.org>
1413
1414         Dragging a .jpg to Finder saves it as .jpeg
1415         https://bugs.webkit.org/show_bug.cgi?id=105140
1416         https://code.google.com/p/chromium/issues/detail?id=35811
1417
1418         Reviewed by Tony Chang.
1419
1420         If the filename's extension is already valid for the MIME type, we don't
1421         need to rewrite it to the preferred extension.
1422
1423         No layout tests because it involves dragging items to the desktop.
1424
1425         * platform/chromium/ClipboardChromium.cpp:
1426         (WebCore::writeImageToDataObject):
1427
1428 2012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
1429
1430         [CSS Exclusions] shape-outside on floats for rectangle shapes height/width
1431         https://bugs.webkit.org/show_bug.cgi?id=100398
1432
1433         Reviewed by Julien Chaffraix.
1434
1435         Implement shape outside for floats changing only the height and width
1436         as a simple starting point.
1437
1438         This implementation changes floats to use the bounding box of the
1439         shape outside instead of the margin box for layout. The content box of
1440         the float is unchanged. This patch does not support positioning the
1441         shape outside box, so the x and y parameters are currently ignored in
1442         the specified shape. This will be fixed in a patch for bug 100399.
1443
1444         Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-margin-is-ignored.html
1445                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-horizontal-multiple.html
1446                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle-percentage.html
1447                fast/exclusions/shape-outside-floats/shape-outside-floats-simple-rectangle.html
1448
1449         * CMakeLists.txt: Add ExclusionShapeOutsideInfo.{cpp,h}.
1450         * GNUmakefile.list.am: Add ExclusionShapeOutsideInfo.{cpp,h}.
1451         * Target.pri: Add ExclusionShapeOutsideInfo.{cpp,h}.
1452         * WebCore.gypi: Add ExclusionShapeOutsideInfo.{cpp,h}.
1453         * WebCore.vcproj/WebCore.vcproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
1454         * WebCore.xcodeproj/project.pbxproj: Add ExclusionShapeOutsideInfo.{cpp,h}.
1455         * rendering/ExclusionShapeOutsideInfo.cpp: Added. Associates the
1456             ExclusionShape object for shape outside with a RenderBox. Analagous to
1457             ExclusionShapeInsideInfo.
1458         (WebCore::exclusionShapeOutsideInfoMap):
1459         (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
1460         (WebCore::ExclusionShapeOutsideInfo::~ExclusionShapeOutsideInfo):
1461         (WebCore::ExclusionShapeOutsideInfo::ensureInfoForRenderBox):
1462         (WebCore::ExclusionShapeOutsideInfo::infoForRenderBox):
1463         (WebCore::ExclusionShapeOutsideInfo::isInfoEnabledForRenderBox):
1464         (WebCore::ExclusionShapeOutsideInfo::removeInfoForRenderBox):
1465         (WebCore::ExclusionShapeOutsideInfo::computedShape):
1466         * rendering/ExclusionShapeOutsideInfo.h: Added. Associates the
1467             ExclusionShape object for shape outside with a RenderBox. Analagous to
1468             ExclusionShapeInsideInfo.
1469         (ExclusionShapeOutsideInfo):
1470         (WebCore::ExclusionShapeOutsideInfo::create):
1471         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalLeft):
1472         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalRight):
1473         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalTop):
1474         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalBottom):
1475         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalWidth):
1476         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalHeight):
1477         (WebCore::ExclusionShapeOutsideInfo::setShapeSize):
1478         (WebCore::ExclusionShapeOutsideInfo::dirtyShapeSize):
1479         * rendering/RenderBlock.cpp:
1480         (WebCore::RenderBlock::insertFloatingObject): Use the shape outside's bounding box to set the width that is
1481             used for inline layout for the float and it's siblings.
1482         (WebCore::RenderBlock::positionNewFloats): Use the shape outside's bounding box to set the height that
1483             is used for inline layout for the float and it's siblings. Ignore margins when positioning if the float
1484             has shape outside, per the exclusions spec. 
1485         * rendering/RenderBox.cpp:
1486         (WebCore::RenderBox::willBeDestroyed): Clean up associated ExclusionShape.
1487         (WebCore::RenderBox::styleDidChange): Handle style change for shape outside.
1488         (WebCore::RenderBox::updateExclusionShapeOutsideInfoAfterStyleChange): Handle style change for shape outside.
1489         * rendering/RenderBox.h:
1490         (WebCore::RenderBox::exclusionShapeOutsideInfo): Get the ExclusionShapeOutsideInfo associated with this
1491             RenderBox.
1492
1493 2012-12-17  John J. Barton  <johnjbarton@chromium.org>
1494
1495         Web Inspector: Search by selection
1496         https://bugs.webkit.org/show_bug.cgi?id=104970
1497
1498         Reviewed by Vsevolod Vlasov.
1499
1500         Upon activation of the search control, conditionally set input.value to window.getSelection().
1501         For both single file (SearchController) and multifile (AdvancedSearchController).
1502
1503         Test: inspector/editor/text-editor-selection-to-search.html
1504
1505         * inspector/front-end/AdvancedSearchController.js:
1506         (WebInspector.AdvancedSearchController.prototype.show):
1507         (WebInspector.SearchView.prototype.syncToSelection):
1508         * inspector/front-end/SearchController.js:
1509         (WebInspector.SearchController.prototype.showSearchField):
1510
1511 2012-12-17  Eduardo Lima Mitev  <elima@igalia.com>
1512
1513         [GStreamer] Use gst_element_link_pads_full() with CHECK_NOTHING for speed and sanity
1514         https://bugs.webkit.org/show_bug.cgi?id=105181
1515
1516         Reviewed by Philippe Normand.
1517
1518         Replace some calls to gst_pad_link() on request pads, by
1519         gst_element_link_pads_full() with CHECK_NOTHING flag, removing
1520         unnecessary pad compatibility checks and simplifying code.
1521
1522         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1523         (webKitWebAudioSrcConstructed): Links audioconvert source with a
1524         requested interleave sink using gst_element_link_pads_full().
1525         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Links a
1526         requested source pad from videoTee with the queue sink.
1527
1528 2012-12-17  Emil A Eklund  <eae@chromium.org>
1529
1530         Clamp values in LayoutUnit::operator/ when SATURATED_LAYOUT_ARITHMETIC is enabled
1531         https://bugs.webkit.org/show_bug.cgi?id=104955
1532
1533         Reviewed by Julien Chaffraix.
1534
1535         LayoutUnit::operator/ currently does not clamp values and
1536         instead overflows when given a value greater than INT_MAX or
1537         less than INT_MIN. 
1538
1539         Test: TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
1540
1541         * platform/LayoutUnit.h:
1542         (WebCore::operator/):
1543         Clamp value if SATURATED_LAYOUT_ARITHMETIC is enabled.
1544
1545 2012-12-17  Simon Fraser  <simon.fraser@apple.com>
1546
1547         Don't allow edge TileCache tiles to be larger than necessary
1548         https://bugs.webkit.org/show_bug.cgi?id=105195
1549
1550         Reviewed by Anders Carlsson.
1551
1552         The TileCache would allow edge tiles to be larger than the required size, with the assumption
1553         that the extra space would never be visible. However, for content tiled layers, it can be,
1554         and it doesn't get correctly cleared. So always keep the edge tiles at the specified size.
1555
1556         * platform/graphics/ca/mac/TileCache.mm:
1557         (WebCore::TileCache::revalidateTiles):
1558
1559 2012-12-17  Bem Jones-Bey  <bjonesbe@adobe.com>
1560
1561         [CSS Exclusions] Floats should respect shape-inside on exclusions
1562         https://bugs.webkit.org/show_bug.cgi?id=89261
1563
1564         Reviewed by David Hyatt.
1565
1566         Position floats properly with respect to an exclusion shape. Note that
1567         this will not attempt to position floats in a polygon that has
1568         multiple segments. In the multiple segment case, the floats will be
1569         positioned as if the exclusion did not exist.
1570
1571         Updated an existing test case to test for this.
1572         Test: fast/exclusions/shape-inside/shape-inside-floats-simple.html
1573
1574         * rendering/RenderBlock.cpp:
1575         (WebCore::RenderBlock::computeLogicalLocationForFloat): Adjust the
1576         right and left offsets to take into account the right and left offset
1577         contributed by the exclusion shape.
1578
1579 2012-12-17  Antoine Quint  <graouts@apple.com>
1580
1581         GraphicsLayer's repaint count should update even when debugging option to show it is off
1582         https://bugs.webkit.org/show_bug.cgi?id=105178
1583
1584         Reviewed by Simon Fraser.
1585
1586         Update the repain count even if the debug option to show them is turned off.
1587         This allows the count to be accurate in between toggles of the debug option
1588         and to allow the InspectorLayerTreeAgent to get accurate results any time
1589         the layer tree is requested (see webkit.org/b/105024).
1590
1591         * platform/graphics/mac/WebLayer.mm:
1592         (drawLayerContents):
1593
1594 2012-12-17  Hans Muller  <hmuller@adobe.com>
1595
1596         [CSS Exclusions] Add helper functions for converting floats to LayoutUnits
1597         https://bugs.webkit.org/show_bug.cgi?id=103450
1598
1599         Reviewed by Dirk Schulze.
1600
1601         When a float logicalTop value is converted to a LayoutUnit it's necessary to
1602         use LayoutUnit::fromFloatCeil() to ensure that we're snapping to a value that's
1603         inside the ExclusionShape.  Similarly, to convert a logicalBottom value from
1604         float to LayoutUnit we use LayoutUnit::fromFloatFloor().  Added a pair of private
1605         ExlcusionShapeInsideInfo methods that do the conversions and refactored existing
1606         code to use them.
1607
1608         This is just a cleanup.  No new tests are needed, the existing tests cover
1609         these changes.
1610
1611         * rendering/ExclusionShapeInsideInfo.cpp:
1612         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): Use the new floatLogicalTopToLayoutUnit() method.
1613         * rendering/ExclusionShapeInsideInfo.h:
1614         (WebCore::ExclusionShapeInsideInfo::shapeLogicalTop): Use the new floatLogicalTopToLayoutUnit() method.
1615         (WebCore::ExclusionShapeInsideInfo::shapeLogicalBottom): Use the new floatLogicalBottomToLayoutUnit() method.
1616         (ExclusionShapeInsideInfo):
1617         (WebCore::ExclusionShapeInsideInfo::floatLogicalTopToLayoutUnit): Convert a float to a LayoutUnit with LayoutUnit::fromFloatCeil().
1618         (WebCore::ExclusionShapeInsideInfo::floatLogicalBottomToLayoutUnit): Convert a float to a LayoutUnit with LayoutUnit::fromFloatFloor().
1619
1620 2012-12-17  Antoine Quint  <graouts@apple.com>
1621
1622         Web Inspector: Provide the paint count of layers through the LayerTreeAgent
1623         https://bugs.webkit.org/show_bug.cgi?id=105024
1624
1625         Reviewed by Pavel Feldman.
1626
1627         We add a new optional .paintCount property to the Layer object, passing through the
1628         relevant information from GraphicsLayer.
1629
1630         * inspector/Inspector.json:
1631         * inspector/InspectorLayerTreeAgent.cpp:
1632         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1633
1634 2012-12-17  Pavel Feldman  <pfeldman@chromium.org>
1635
1636         Web Inspector: [chromium] make toolbar render with Mountain Lion-friendly colors
1637         https://bugs.webkit.org/show_bug.cgi?id=105177
1638
1639         Reviewed by Vsevolod Vlasov.
1640
1641         * inspector/front-end/UIUtils.js:
1642         (WebInspector.platformFlavor):
1643         * inspector/front-end/inspector.css:
1644         (#toolbar):
1645         (body.dock-to-bottom #toolbar):
1646         (.toolbar-item):
1647
1648 2012-12-17  Andreas Kling  <akling@apple.com>
1649
1650         Attribute: Remove unused constructor and isNull().
1651         <http://webkit.org/b/105179>
1652
1653         Reviewed by Antti Koivisto.
1654
1655         Removed the Attribute constructor that takes a localName rather than a full QualifiedName as that was never used.
1656         Also removed Attribute::isNull(), since that was only called in one place where isNull() will never be true.
1657
1658         * dom/Attribute.h:
1659         * html/HTMLIFrameElement.cpp:
1660         (WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute):
1661
1662 2012-12-17  Anthony Scian  <ascian@rim.com>
1663
1664         [Blackberry] Static code analysis warning fixes
1665         https://bugs.webkit.org/show_bug.cgi?id=105129
1666
1667         Reviewed by Rob Buis.
1668
1669         - alloca can return NULL, recoded to just use a temp var
1670
1671         * plugins/blackberry/PluginViewBlackBerry.cpp:
1672         (WebCore::PluginView::updateBuffer):
1673
1674 2012-12-17  Eugene Klyuchnikov  <eustas@chromium.org>
1675
1676         Web Inspector: Make popover content accessible for clicks.
1677         https://bugs.webkit.org/show_bug.cgi?id=105167
1678
1679         Reviewed by Vsevolod Vlasov.
1680
1681         Currently it is very hard to move mouse pointer inside of popover area.
1682         The only maneuver is to precisely jerk the mouse in direction of popover.
1683
1684         This path makes anchor and popover "active" areas overlap, so it becomes
1685         possible to smoothly move mouse to popover interior.
1686
1687         * inspector/front-end/Popover.js:
1688         (WebInspector.Popover.prototype._innerShow): Make popover "outer" border
1689         an be "active" area.
1690         * inspector/front-end/popover.css: Allow popover "outer" border receive
1691         mouse events.
1692
1693 2012-12-17  Andrey Kosyakov  <caseq@chromium.org>
1694
1695         Web Inspector: Persist Audit selections across sessions
1696         https://bugs.webkit.org/show_bug.cgi?id=103944
1697
1698         Reviewed by Alexander Pavlov.
1699
1700         Make selected audit categories a persistent setting, to simplify life for those
1701         repeatedly running same set of categories.
1702
1703         * inspector/front-end/AuditLauncherView.js:
1704         (WebInspector.AuditLauncherView):
1705         (WebInspector.AuditLauncherView.prototype.addCategory.get var):
1706         (WebInspector.AuditLauncherView.prototype.addCategory):
1707         (WebInspector.AuditLauncherView.prototype._selectAllClicked):
1708         (WebInspector.AuditLauncherView.prototype._categoryClicked):
1709         (WebInspector.AuditLauncherView.prototype._createCategoryElement):
1710
1711 2012-12-17  Zeno Albisser  <zeno@webkit.org>
1712
1713         [Texmap] Drawing of ARB textures broken after r137498.
1714         https://bugs.webkit.org/show_bug.cgi?id=105165
1715
1716         Disable antialiasing for ARB textures after unifying
1717         code paths. We are currently missing a fragment shader
1718         to do antialiasing with ARB textures.
1719
1720         Reviewed by Kenneth Rohde Christiansen.
1721
1722         * platform/graphics/texmap/TextureMapperGL.cpp:
1723         (WebCore::TextureMapperGL::drawTexture):
1724
1725 2012-12-17  Eugene Klyuchnikov  <eustas@chromium.org>
1726
1727         Web Inspector: Popup flickers when cursor moves between elements with same anchor.
1728         https://bugs.webkit.org/show_bug.cgi?id=104992
1729
1730         Reviewed by Pavel Feldman.
1731
1732         Popup disappears and then appears again when mouse pointer traverses
1733         between sub-elements of anchor element.
1734
1735         * inspector/front-end/Popover.js: Split method "_mouseOut".
1736         (WebInspector.PopoverHelper.prototype._popoverMouseOut):
1737         Handler for Popover.
1738         (WebInspector.PopoverHelper.prototype._mouseOut):
1739         Handler for PopoverHelper.
1740
1741 2012-12-12  Andrey Kosyakov  <caseq@chromium.org>
1742
1743         [Chromium] Remove support for TRACE_EVENT_IF_LONGER_THANx macros
1744         https://bugs.webkit.org/show_bug.cgi?id=104784
1745
1746         Reviewed by Pavel Feldman.
1747
1748         - removed TRACE_EVENT_IF_LONGER_THANx macros;
1749         - changed addTraceEvent() to return void, as we no longer need the index of added event.
1750
1751         * platform/EventTracer.h:
1752         (EventTracer):
1753         * platform/chromium/EventTracerChromium.cpp:
1754         (WebCore::EventTracer::addTraceEvent):
1755         * platform/chromium/TraceEvent.h:
1756         (TraceEvent):
1757         (WebCore::TraceEvent::addTraceEvent):
1758         (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled):
1759         (Data):
1760
1761 2012-12-17  Kentaro Hara  <haraken@chromium.org>
1762
1763         Unreviewed, rolling out r136794.
1764         http://trac.webkit.org/changeset/136794
1765         https://bugs.webkit.org/show_bug.cgi?id=104203
1766
1767         The GC change can leak memory
1768
1769         * bindings/v8/V8GCController.cpp:
1770         (WebCore):
1771         (WebCore::addImplicitReferencesForNodeWithEventListeners):
1772
1773 2012-12-17  Gabor Rapcsanyi  <rgabor@webkit.org>
1774
1775         Reduce the code size of ARM SIMD in GraphicsContext3D
1776         https://bugs.webkit.org/show_bug.cgi?id=105086
1777
1778         Reviewed by Zoltan Herczeg.
1779
1780         Reduce the code size of ARM SIMD in GraphicsContext3D and change the ARM
1781         namespace to SIMD.
1782
1783         * platform/graphics/GraphicsContext3D.cpp:
1784         (WebCore):
1785         * platform/graphics/cpu/arm/GraphicsContext3DNEON.h:
1786         (WebCore::SIMD::unpackOneRowOfRGBA4444ToRGBA8):
1787         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort4444):
1788         (WebCore::SIMD::unpackOneRowOfRGBA5551ToRGBA8):
1789         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort5551):
1790         (WebCore::SIMD::unpackOneRowOfRGB565ToRGBA8):
1791         (WebCore::SIMD::packOneRowOfRGBA8ToUnsignedShort565):
1792
1793 2012-12-16  Andrey Kosyakov  <caseq@chromium.org>
1794
1795         Web Inspector: frame bars on timeline do not react on hover and double click
1796         https://bugs.webkit.org/show_bug.cgi?id=105153
1797
1798         Reviewed by Alexander Pavlov.
1799
1800         Remove z-index: -100 from #timeline-grid-header, as it prevents mouse events from
1801         reaching frame strip. Use pointer-events: none on frame dividers instead.
1802
1803         * inspector/front-end/timelinePanel.css:
1804         (.timeline .resources-event-divider.timeline-frame-divider):
1805         (#timeline-grid-header):
1806
1807 2012-12-16  Kentaro Hara  <haraken@chromium.org>
1808
1809         [V8] Improve performance of a conversion from WebKit strings to V8 strings
1810         https://bugs.webkit.org/show_bug.cgi?id=105150
1811
1812         Reviewed by Eric Seidel.
1813
1814         V8 provides v8::Weak(isolate) and v8::Local::New(isolate, ...),
1815         which are much faster than v8::Weak() and v8::Local::New().
1816         By using the faster APIs, we can improve performance of a conversion
1817         from a WebKit string to a V8 string. This improves performance of
1818         div.id, div.className, ...and a lot of DOM attributes that return
1819         strings.
1820
1821         [Dromaeo/dom-attr]
1822         120 runs/sec, 120 runs/sec, 118 runs/sec => 125 runs/sec, 123 run/sec, 125 runs/sec (+4.1%)
1823
1824         [Dromaeo/dom-traverse]
1825         94 runs/sec, 94 runs/sec, 96 runs/sec => 107 runs/sec, 105 runs/sec, 107 runs/sec (+12.3%)
1826
1827         [Bindings/id-getter]
1828         356 runs/sec, 356 runs/sec, 341 runs/sec => 423 runs/sec, 424 runs/sec, 424 runs/sec (+20.7%)
1829
1830         No tests. No change in behavior.
1831
1832         * bindings/v8/V8ValueCache.h:
1833         (WebCore::StringCache::v8ExternalString):
1834
1835 2012-12-16  Arvid Nilsson  <anilsson@rim.com>
1836
1837         [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
1838         https://bugs.webkit.org/show_bug.cgi?id=105143
1839         RIM PR 171941
1840
1841         Reviewed by Rob Buis.
1842         Internally reviewed by George Staikos.
1843
1844         TouchPoint instances now provide document coordinates for the viewport
1845         and content position of the touch event. The pixel coordinates stored
1846         in the TouchPoint should no longer be needed in WebKit.
1847
1848         Also adapt to new method names and encapsulation of TouchPoint data
1849         members.
1850
1851         No change in behavior, no new tests.
1852
1853         * platform/blackberry/PlatformTouchPointBlackBerry.cpp:
1854         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
1855
1856 2012-12-16  Eugene Klyuchnikov  <eustas@chromium.org>
1857
1858         Web Inspector: Fix JS compiler warning.
1859         https://bugs.webkit.org/show_bug.cgi?id=105032
1860
1861         Reviewed by Pavel Feldman.
1862
1863         Problem: event handler parameter has actial parameter
1864         type KeyboardEvent, but ".addEventListener" refuses listeners with such
1865         signature.
1866
1867         Solution: explicitly upcast argument type.
1868
1869         * inspector/front-end/ElementsTreeOutline.js: Update JsDocs.
1870
1871 2012-12-16  Tim Horton  <timothy_horton@apple.com>
1872
1873         PDFPlugin: The "Open in Preview" HUD button should work
1874         https://bugs.webkit.org/show_bug.cgi?id=102448
1875         <rdar://problem/12695729>
1876
1877         Reviewed by Alexey Proskuryakov.
1878
1879         Expose createCanonicalUUIDString and UUID.h.
1880
1881         * WebCore.exp.in:
1882         * WebCore.xcodeproj/project.pbxproj:
1883
1884 2012-12-16  Seokju Kwon  <seokju.kwon@gmail.com>
1885
1886         Fix unused parameter compile warnings
1887         https://bugs.webkit.org/show_bug.cgi?id=105089
1888
1889         Reviewed by Kentaro Hara.
1890
1891         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
1892
1893         No new tests, no behavior change.
1894
1895         * bindings/js/JSDOMWindowBase.cpp:
1896         (WebCore::JSDOMWindowBase::supportsProfiling):
1897         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
1898
1899 2012-12-16  Alexey Proskuryakov  <ap@apple.com>
1900
1901         <rdar://problem/12886898> Bundle uploads don't work
1902         https://bugs.webkit.org/show_bug.cgi?id=105149
1903
1904         Reviewed by Sam Weinig.
1905
1906         * WebCore.exp.in: Exported FormData::removeGeneratedFilesIfNeeded().
1907
1908         * platform/network/FormData.cpp:
1909         (WebCore::encodeElement):
1910         (WebCore::decodeElement):
1911         Encode generated file name for archive, too. I'm not entirely sure how this affects other uses
1912         of FormData serialization, but it seems logical that if we encode m_hasGeneratedFiles, we
1913         should also encode their names.
1914
1915 2012-12-16  Hayato Ito  <hayato@chromium.org>
1916
1917         [Shadow DOM] Kill ShadowRoot constructor
1918         https://bugs.webkit.org/show_bug.cgi?id=102913
1919
1920         Reviewed by Dimitri Glazkov.
1921
1922         Re-landing r137408 which breaks browser tests on chromium. I've
1923         updated the browser tests on chromium so that they do not use
1924         WebKitShadowRoot constructor.
1925
1926         No new tests. Updating existing layout tests.
1927
1928         * dom/ShadowRoot.idl:
1929         * page/DOMWindow.idl:
1930
1931 2012-12-16  Jon Lee  <jonlee@apple.com>
1932
1933         Allow built-in PDF plugin and plugin documents to auto-start
1934         https://bugs.webkit.org/show_bug.cgi?id=105000
1935         <rdar://problem/12633351>
1936
1937         Reviewed by Sam Weinig.
1938
1939         Plug-ins in plug-in documents that are in the main frame should always auto-start.
1940
1941         Add a virtual function that returns whether the PluginViewBase should auto-start its plug-in.
1942         Add a callback that gives the HTML plug-in element an opportunity to set the display state
1943         based on the widget.
1944
1945         * plugins/PluginViewBase.h:
1946         (WebCore::PluginViewBase::shouldAlwaysAutoStart): Added. By default returns false.
1947
1948         * html/HTMLPlugInImageElement.cpp:
1949         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Renamed from
1950         subframeLoaderWillLoadPlugIn() for consistency. This call will also be made a little later
1951         in the subframe loader. Adds a check to see if the plug-in is inside a plug-in document
1952         of the main frame. If so, auto-start.
1953         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn): Given the widget created,
1954         check to see if it should always auto-start. If so, set the display state to Playing. Otherwise
1955         leave the display state alone.
1956         * html/HTMLPlugInImageElement.h:
1957
1958         * loader/SubframeLoader.cpp:
1959         (WebCore::SubframeLoader::requestPlugin): Move the will-load-plug-in call into loadPlugin().
1960         (WebCore::SubframeLoader::loadPlugin): Immediately prior to the plug-in's creation, make the
1961         will-create call. If a plug-in was made, make the did-create call. The did-create call should
1962         be made before setWidget() since that might initialize the plug-in, which could take the display
1963         state into account if being initialized synchronously.
1964
1965 2012-12-16  Huang Dongsung  <luxtella@company100.net>
1966
1967         [TexMap] Perform the layer-tree traversal in GraphicsLayerTextureMapper.
1968         https://bugs.webkit.org/show_bug.cgi?id=103366
1969
1970         Reviewed by Noam Rosenthal.
1971
1972         Currently, Texture Mapper performs the layer-tree traversal in
1973         TextureMapperLayer, while Coordinated Graphics performs the traversal in
1974         CoordinatedGraphicsLayer. This patch makes Texture Mapper perform the
1975         traversal in GraphicsLayerTextureMapper.
1976
1977         Also removed the SyncOptions enum, which is redundant since no client
1978         calls it with ComputationsOnly.
1979
1980         This is in preparation for refactoring TextureMapper to work in an actor
1981         model (http://webkit.org/b/103854).
1982
1983         No new tests. Covered by existing tests.
1984
1985         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1986         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
1987         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
1988         (WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
1989         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1990         (GraphicsLayerTextureMapper):
1991         * platform/graphics/texmap/TextureMapperLayer.cpp:
1992         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
1993         * platform/graphics/texmap/TextureMapperLayer.h:
1994         (TextureMapperLayer):
1995
1996 2012-12-16  Levi Weintraub  <leviw@chromium.org>
1997
1998         Push pixel snapping logic into TransformState
1999         https://bugs.webkit.org/show_bug.cgi?id=101779
2000
2001         Reviewed by Simon Fraser.
2002
2003         The old SnapOffsetForTransforms behavior fell apart when there was content nested in
2004         multiple levels of containers with sub-pixel offsets. The point of this flag was to
2005         mirror the pixel snapping that occurs in paint, where offsets are accumulated bottom-
2006         up through the render tree and snapped at the end. This change eliminates this flag
2007         and pushes pixel snapping logic down into TransformState.
2008
2009         TransformState now tracks a LayoutSize accumulated offset when there's no transform
2010         or we're just translating. We then snap and apply this offset before accumulating
2011         values into a transform, and when returning planar coordinates to callers.
2012
2013         Test: fast/sub-pixel/transformed-iframe-copy-on-scroll.html added,
2014               fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html modified to also catch this bug.
2015
2016         * platform/graphics/transforms/TransformState.cpp:
2017         (WebCore::TransformState::operator=): Pass accumulated offset.
2018         (WebCore::TransformState::translateTransform): Extracted this functionality for
2019         re-use when applying the accumulated offset, or accumulating from a call to move.
2020         (WebCore::TransformState::translateMappedCoordinates): Same as above when we're not
2021         acculating into a transform.
2022         (WebCore::TransformState::move): Changed to accumulate into m_accumulatedOffset when
2023         not accumulating into a transform.
2024         (WebCore::TransformState::applyAccumulatedOffset):
2025         (WebCore::TransformState::applyTransform): Applies the accumulated offset before the
2026         transform.
2027         (WebCore::TransformState::flatten): Ditto for flattening.
2028         (WebCore::TransformState::mappedPoint): Translates by the accumulated offset before
2029         returning.
2030         (WebCore::TransformState::mappedQuad): Ditto.
2031         * platform/graphics/transforms/TransformState.h:
2032         (TransformState): Added m_accumulatedOffset.
2033         * rendering/RenderGeometryMap.cpp:
2034         (WebCore::RenderGeometryMap::mapToContainer): When not using a transform, we still need
2035         to snap our offset before applying to our float result. Also, flatten when we have a
2036         non-uniform step.
2037         * rendering/RenderGeometryMap.h:
2038         (RenderGeometryMap): Remove use of SnapOffsetForTransforms.
2039
2040         Everything below simply drops the use of SnapOffsetForTransforms:
2041
2042         * dom/ContainerNode.cpp:
2043         (WebCore::ContainerNode::getUpperLeftCorner):
2044         * dom/MouseRelatedEvent.cpp:
2045         (WebCore::MouseRelatedEvent::computeRelativePosition):
2046         * editing/FrameSelection.cpp:
2047         (WebCore::CaretBase::absoluteBoundsForLocalRect):
2048         * editing/RenderedPosition.cpp:
2049         (WebCore::RenderedPosition::absoluteRect):
2050         * editing/VisiblePosition.cpp:
2051         (WebCore::VisiblePosition::absoluteCaretBounds):
2052         * html/HTMLSelectElement.cpp:
2053         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2054         * html/shadow/SliderThumbElement.cpp:
2055         (WebCore::SliderThumbElement::setPositionFromPoint):
2056         * html/shadow/SpinButtonElement.cpp:
2057         (WebCore::SpinButtonElement::defaultEventHandler):
2058         * page/FrameView.cpp:
2059         (WebCore::FrameView::convertFromRenderer):
2060         (WebCore::FrameView::convertToRenderer):
2061         * rendering/InlineTextBox.cpp:
2062         (WebCore::InlineTextBox::paintDocumentMarker):
2063         (WebCore::InlineTextBox::paintTextMatchMarker):
2064         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2065         * rendering/LayoutState.cpp:
2066         (WebCore::LayoutState::LayoutState):
2067         * rendering/RenderBox.cpp:
2068         (WebCore::RenderBox::mapLocalToContainer):
2069         (WebCore::RenderBox::pushMappingToContainer):
2070         * rendering/RenderBox.h:
2071         (RenderBox):
2072         * rendering/RenderBoxModelObject.cpp:
2073         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
2074         * rendering/RenderEmbeddedObject.cpp:
2075         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2076         * rendering/RenderFrameSet.cpp:
2077         (WebCore::RenderFrameSet::userResize):
2078         * rendering/RenderInline.cpp:
2079         (WebCore::RenderInline::mapLocalToContainer):
2080         (WebCore::RenderInline::pushMappingToContainer):
2081         * rendering/RenderInline.h:
2082         (RenderInline):
2083         * rendering/RenderLayer.cpp:
2084         (WebCore::RenderLayer::absoluteToContents):
2085         (WebCore::RenderLayer::scrollTo):
2086         (WebCore::RenderLayer::childrenClipRect):
2087         (WebCore::RenderLayer::selfClipRect):
2088         * rendering/RenderLayerBacking.cpp:
2089         (WebCore::RenderLayerBacking::contentsVisible):
2090         * rendering/RenderMediaControls.cpp:
2091         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
2092         * rendering/RenderMenuList.cpp:
2093         (WebCore::RenderMenuList::showPopup):
2094         * rendering/RenderObject.cpp:
2095         (WebCore::RenderObject::absoluteFocusRingQuads):
2096         * rendering/RenderObject.h:
2097         * rendering/RenderText.cpp:
2098         (WebCore::RenderText::absoluteRectsForRange):
2099         (WebCore::RenderText::absoluteQuads):
2100         (WebCore::RenderText::absoluteQuadsForRange):
2101         * rendering/RenderTheme.cpp:
2102         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
2103         * rendering/RenderView.cpp:
2104         (WebCore::RenderView::selectionBounds):
2105         * rendering/RenderView.h:
2106         (RenderView):
2107         * rendering/RenderWidget.cpp:
2108         (WebCore::RenderWidget::updateWidgetGeometry):
2109         * rendering/svg/RenderSVGForeignObject.cpp:
2110         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
2111         * rendering/svg/RenderSVGForeignObject.h:
2112         (RenderSVGForeignObject):
2113         * rendering/svg/RenderSVGInline.cpp:
2114         (WebCore::RenderSVGInline::mapLocalToContainer):
2115         * rendering/svg/RenderSVGInline.h:
2116         (RenderSVGInline):
2117         * rendering/svg/RenderSVGModelObject.cpp:
2118         (WebCore::RenderSVGModelObject::mapLocalToContainer):
2119         * rendering/svg/RenderSVGModelObject.h:
2120         (RenderSVGModelObject):
2121         * rendering/svg/RenderSVGRoot.h:
2122         (RenderSVGRoot):
2123         * rendering/svg/RenderSVGText.cpp:
2124         (WebCore::RenderSVGText::mapLocalToContainer):
2125         * rendering/svg/RenderSVGText.h:
2126         (RenderSVGText):
2127         * rendering/svg/SVGRenderSupport.cpp:
2128         (WebCore::SVGRenderSupport::mapLocalToContainer):
2129         * rendering/svg/SVGRenderSupport.h:
2130         (SVGRenderSupport):
2131
2132 2012-12-15  Anders Carlsson  <andersca@apple.com>
2133
2134         Rename FrameLoaderClient::download to convertMainResourceLoadToDownload
2135         https://bugs.webkit.org/show_bug.cgi?id=105122
2136
2137         Reviewed by Andreas Kling.
2138
2139         Rename FrameLoaderClient::download to convertMainResourceLoadToDownload and change it to take a MainResourceLoader instead
2140         of a ResourceHandle, since resource handles may not exist when loading isn't done in the web process.
2141
2142         * WebCore.exp.in:
2143         * WebCore.xcodeproj/project.pbxproj:
2144         * loader/EmptyClients.h:
2145         * loader/FrameLoaderClient.h:
2146         (WebCore):
2147         (FrameLoaderClient):
2148         * loader/MainResourceLoader.cpp:
2149         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2150
2151 2012-12-16  Eric Carlson  <eric.carlson@apple.com>
2152
2153         Remove in-band text tracks when media element's src changes
2154         https://bugs.webkit.org/show_bug.cgi?id=105081
2155
2156         Reviewed by Sam Weinig.
2157
2158         No new tests, media/track/track-in-band.html was updated to test this change.
2159
2160         * html/HTMLMediaElement.cpp:
2161         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTrack): Move some code into removeTrack.
2162         (WebCore::HTMLMediaElement::removeTrack): New, remove a track and all of its cues.
2163         (WebCore::HTMLMediaElement::removeAllInbandTracks): New, remove all in-band tracks.
2164         (WebCore::HTMLMediaElement::clearMediaPlayer): Call removeAllInbandTracks.
2165         * html/HTMLMediaElement.h:
2166
2167         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2168         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2169         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
2170         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Call clearTextTracks.
2171         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearTextTracks): Remove all tracks from client.
2172
2173 2012-12-16  Simon Fraser  <simon.fraser@apple.com>
2174
2175         Fix assertions when doing a full repaint of compositing layers
2176         https://bugs.webkit.org/show_bug.cgi?id=105128
2177
2178         Reviewed by Dan Bernstein.
2179
2180         In r137811 I added code to repaint all compositing layers when FrameView::layout()
2181         is doing a full repaint. However, this code needs to avoid calling setContentsNeedDisplay()
2182         on layers that don't actually draw their own content: those that draw into an ancestor,
2183         and those that draw into a window.
2184
2185         Fixes assertions in existing tests.
2186
2187         * rendering/RenderLayerBacking.cpp:
2188         (WebCore::RenderLayerBacking::updateAfterLayout):
2189
2190 2012-12-16  ChangSeok Oh  <shivamidow@gmail.com>
2191
2192         [GTK][AC] Build failure with an option --with-acceleration-backend=clutter
2193         https://bugs.webkit.org/show_bug.cgi?id=105027
2194
2195         Reviewed by Gustavo Noronha Silva.
2196
2197         GLContext.* and RedirectedXCompositeWindow.* are meaningful only if opengl is
2198         a backend for the AC. So I wrap them in USE_OPENGL.
2199
2200         No new tests. This patch fixes a build fauilure, not adding new features.
2201
2202         * GNUmakefile.list.am:
2203
2204 2012-12-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2205
2206         [GStreamer] create playbin in ::load(), not in player constructor
2207         https://bugs.webkit.org/show_bug.cgi?id=103898
2208
2209         Reviewed by Philippe Normand.
2210
2211         This patch moves the instantiation of the playbin pipeline into the
2212         WebCore::MediaPlayerPrivateGStreamer::load() method, so the pipeline
2213         layout can reflect other predefined settings such as audio pitch
2214         preservation in variable playback rate scenarios
2215
2216         No new tests. Covered by existing tests.
2217
2218         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2219         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2220         (WebCore::MediaPlayerPrivateGStreamer::load):
2221         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2222         (MediaPlayerPrivateGStreamer):
2223
2224 2012-12-16  Mihnea Ovidenie  <mihnea@adobe.com>
2225
2226         [CSSRegions] Pseudo-elements should not be directly collected into a named flow
2227         https://bugs.webkit.org/show_bug.cgi?id=105046
2228
2229         Reviewed by Abhishek Arya.
2230
2231         Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.
2232         Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
2233         like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
2234         collected into a flow thread.
2235
2236         Tests: fast/regions/pseudo-after-content-node.html
2237                fast/regions/pseudo-before-content-node.html
2238                fast/regions/pseudo-first-letter-content-node.html
2239                fast/regions/pseudo-first-line-content-node.html
2240
2241         * dom/NodeRenderingContext.cpp:
2242         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2243
2244 2012-12-16  Mihai Maerean  <mmaerean@adobe.com>
2245
2246         [CSS Regions] broken feature detection: body.webkitRegionOverset and body.webkitGetRegionFlowRanges shouldn't succeed when disabled at runtime
2247         https://bugs.webkit.org/show_bug.cgi?id=99707
2248
2249         Reviewed by Hajime Morita.
2250
2251         The bug is that the CSS Regions feature leaks information at run-time. There are JS properties that exist even
2252         if the feature is disabled at run-time (document.webkitGetNamedFlows, document.body.webkitRegionOverset,
2253         document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule).
2254
2255         The fix is to add V8EnabledAtRuntime=cssRegions in the IDL files to the properties that leak information and to
2256         the interfaces that are the type of those properties.
2257
2258         Test: fast/regions/region-leak-js-information-when-disabled-at-runtime.html
2259
2260         * css/WebKitCSSRegionRule.idl:
2261             added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule interface.
2262         * dom/DOMNamedFlowCollection.idl:
2263             added V8EnabledAtRuntime=cssRegions for the DOMNamedFlowCollection interface.
2264         * dom/Document.idl:
2265             added V8EnabledAtRuntime=cssRegions for the webkitGetNamedFlows method.
2266         * dom/Element.idl:
2267             added V8EnabledAtRuntime=cssRegions for the webkitRegionOverset attribute.
2268             added V8EnabledAtRuntime=cssRegions for the webkitGetRegionFlowRanges method.
2269         * page/DOMWindow.idl:
2270             added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule attribute.
2271
2272 2012-12-15  Ian Vollick  <vollick@chromium.org>
2273
2274         [chromium] Automatically use composited scrolling
2275         https://bugs.webkit.org/show_bug.cgi?id=94743
2276
2277         Reviewed by Adrienne Walker.
2278
2279         We currently use the composited scrolling facilities provided by
2280         wkb.ug/91117 if the overflow scroll block element is styled with
2281         -webkit-overflow-scrolling: touch. Ideally, we could automatically
2282         opt into composited scrolling if it is safe to do so. This can affect
2283         antialiasing, so it is important that automatically opting in is only
2284         enabled via a setting.
2285
2286         The way I determine if it is safe is by checking that z-ordering will
2287         not be affected if the overflow scrollable element were promoted to a
2288         stacking context (details below), and that clipping our scrolling
2289         descendants will not affect rendering.
2290
2291         To check the first condition (that z-ordering will not be affected).
2292         I ensure that the candidate element and all its descendants appear as a 
2293         contiguous block in the candidate's stacking context. That is, if no 
2294         other elements are 'between' any of the candidates descendants when we
2295         sort in paint order, then we're safe. This is overly conservative,
2296         however. We could, in future, only consider stacking problems between
2297         elements that actually overlap.
2298
2299         To ensure that clipping will not cause a rendering change, I ensure
2300         that the layer has no out of flow positioned descendant whose
2301         containing block is not also a descendant of ours.
2302
2303         Test: compositing/overflow/automatically-opt-into-compositing-scrolling.html
2304
2305         (WebCore):
2306         * rendering/RenderLayer.cpp:
2307         (WebCore::RenderLayer::RenderLayer):
2308         (WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
2309         (WebCore):
2310         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
2311         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive):
2312         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
2313         (WebCore::RenderLayer::canSafelyEstablishAStackingContext):
2314           Returns true if the RenderLayer could become a stacking context without
2315           affecting the stacking order.
2316         (WebCore::RenderLayer::updateDescendantDependentFlags):
2317           We now need to keep track of out of flow positioned descendants.
2318         (WebCore::RenderLayer::addChild):
2319         (WebCore::RenderLayer::removeChild):
2320         (WebCore::RenderLayer::usesCompositedScrolling):
2321           Returns true if the layer actually is using composited scrolling.
2322           This function may return false, even when needsCompositedScrolling
2323           returns true.
2324         (WebCore::RenderLayer::needsCompositedScrolling):
2325           This function returns true if we would like to use composited
2326           scrolling and it is safe to turn it on.
2327         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
2328         (WebCore::RenderLayer::scrollTo):
2329         (WebCore::RenderLayer::dirtyZOrderLists):
2330         (WebCore::RenderLayer::dirtyNormalFlowList):
2331           Since these could affect opting into composited scrolling, we must
2332           request that the RenderLayerCompositor reevaluate compositing.
2333         (WebCore::RenderLayer::updateLayerListsIfNeeded):
2334           We call updateCanSafelyEstablishStackingContext here, if necessary.
2335         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
2336         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
2337           usesCompositedScrolling -> needsCompositedScrolling
2338         (WebCore::RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant):
2339         (WebCore::RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus):
2340         (WebCore::RenderLayer::updateOutOfFlowPositioned):
2341           Dirties and sets the out of flow positioned descendant state.
2342         (WebCore::RenderLayer::styleChanged):
2343         * rendering/RenderLayer.h:
2344         (RenderLayer):
2345         (WebCore::RenderLayer::hasOutOfFlowPositionedDescendant):
2346         * rendering/RenderLayerBacking.cpp:
2347         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
2348         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2349         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2350         (WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers):
2351         (WebCore):
2352         * rendering/RenderLayerBacking.h:
2353         (RenderLayerBacking):
2354         * rendering/RenderLayerCompositor.cpp:
2355         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2356         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
2357         * rendering/RenderLayerCompositor.h:
2358         (WebCore::RenderLayerCompositor::setShouldReevaluateCompositingAfterLayout):
2359         * testing/InternalSettings.cpp:
2360         (WebCore::InternalSettings::setEnableCompositingForOverflowScroll):
2361           Allows enabling the setting in layout tests.
2362         (WebCore):
2363         * testing/InternalSettings.h:
2364         (InternalSettings):
2365         * testing/InternalSettings.idl:
2366
2367 2012-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2368
2369         Unreviewed. Fix make distcheck.
2370
2371         * bindings/gobject/GNUmakefile.am: Do not dist generated DOM
2372         bindings headers.
2373         * platform/ScrollAnimatorNone.cpp: Include PlatformGestureEvent.h
2374         only if gesture events are enabled.
2375
2376 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
2377
2378         Build fix.
2379
2380         * platform/network/FormData.cpp:
2381         (WebCore::encodeElement):
2382         (WebCore::decodeElement):
2383         (WebCore::FormData::encode):
2384         (WebCore::FormData::decode):
2385         Disambiguated encode/decode functions. I'm not quite sure why the compiler was
2386         confused, but distinct names should make the code more readable anyway.
2387
2388 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
2389
2390         <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type=file> doesn't work)
2391         https://bugs.webkit.org/show_bug.cgi?id=105120
2392
2393         Reviewed by Sam Weinig.
2394
2395         * WebCore.exp.in:
2396         * history/HistoryItem.cpp:
2397         * platform/network/FormData.h:
2398         Renamed encodeForBackForward and decodeForBackForward to encode and decode, respectively.
2399         I couldn't find anything in these that would limit them to this use, and data encoded
2400         for b/f has to be good enough to re-create a request anyway.
2401
2402         * platform/network/FormData.cpp: (WebCore::decode): Fixed file data decoder to not
2403         bail out in the general case of posting a complete file.
2404
2405 2012-12-15  Nima Ghanavatian  <nghanavatian@rim.com>
2406
2407         [BlackBerry] Pass key modifiers with touch and mouse events
2408         https://bugs.webkit.org/show_bug.cgi?id=105108
2409
2410         Reviewed by Rob Buis.
2411
2412         Call Screen to retrieve current key modifiers.
2413
2414         Internally reviewed by Gen Mak.
2415
2416         * platform/PlatformMouseEvent.h:
2417         (PlatformMouseEvent):
2418         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
2419         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
2420         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
2421         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2422         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
2423         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
2424
2425 2012-12-15  Otto Derek Cheung  <otcheung@rim.com>
2426
2427         [BlackBerry] Prevent CookieManager from blocking the WKT thread
2428         https://bugs.webkit.org/show_bug.cgi?id=105111
2429
2430         PR 265603
2431
2432         Reviewed by Rob Buis.
2433         Internally reviewed by Konrad Piascik.
2434
2435         The getBackingStoreCookies in WKT is blocking the thread because it has to wait for
2436         the db to be opened before it can call on it.
2437
2438         The fix is to make CookieDatabaseBackingStore in the cookie_db thread dispatch
2439         a getBackingStoreCookies call on WKT after invokeOpen is finished.
2440
2441         Tested loading the browser. Cookies are being loaded into memory on start up.
2442
2443         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
2444         (WebCore::CookieDatabaseBackingStore::invokeOpen):
2445         * platform/blackberry/CookieManager.cpp:
2446         (WebCore::cookieManager):
2447         * platform/blackberry/CookieManager.h:
2448
2449 2012-12-15  Simon Fraser  <simon.fraser@apple.com>
2450
2451         Fix repaint issues when resizing a window with centered content, for platforms with a tile cache
2452         https://bugs.webkit.org/show_bug.cgi?id=105073
2453
2454         Reviewed by Dan Bernstein.
2455
2456         There were several issues with the "do full repaint" code path in
2457         FrameView::layout(). These caused repaint issues when resizing the web view,
2458         especially for platforms that use a tile cache.
2459         
2460         First, the m_doFullRepaint flag wold get clobbered on resize-layouts, because
2461         the call to adjustViewSize() re-enters layout(), and resets the m_doFullRepaint member
2462         variable to false, even if the outer call had previously set it to true. This would
2463         cause us to lose track of whether we needed to do a full repaint. The patch fixes
2464         this by restoring m_doFullRepaint to the value it had before the call to adjustViewSize().
2465         
2466         The second problem was that full repaints would not propagate to compositing
2467         layers. They only repainted the RenderView, and on platforms that use a tile cache,
2468         this only repaints the top portion of that tile cache. This was fixed by sending
2469         a NeedsFullRepaintInBacking flag down into RenderLayer::updateLayerPositions(),
2470         and using that to do a full repaint on all compositing layers.
2471         
2472         Sending this new flag down into updateAfterLayout() prompted some boolean/flags
2473         cleanup with propagated into several files. This also allowed me to no longer
2474         include RenderLayerBacking.h in RenderLayerCompositor.h, but that required
2475         header cleanup in several files.
2476
2477         Automated testing is not possible because WebKitTestRunner resizes the window
2478         asynchronously (bug 105101). Added manual test.
2479
2480         * page/FrameView.cpp:
2481         (WebCore::updateLayerPositionFlags):
2482         (WebCore::FrameView::layout):
2483         * page/scrolling/ScrollingCoordinator.cpp:
2484         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2485         * rendering/RenderLayer.cpp:
2486         (WebCore::RenderLayer::updateLayerPositions):
2487         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
2488         * rendering/RenderLayer.h:
2489         * rendering/RenderLayerBacking.cpp:
2490         (WebCore::RenderLayerBacking::updateAfterLayout):
2491         (WebCore::RenderLayerBacking::contentChanged):
2492         * rendering/RenderLayerBacking.h:
2493         * rendering/RenderLayerCompositor.cpp:
2494         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2495         * rendering/RenderLayerCompositor.h:
2496         * rendering/RenderObject.cpp:
2497         * rendering/RenderView.cpp:
2498
2499 2012-12-15  Anders Carlsson  <andersca@apple.com>
2500
2501         Fix build.
2502
2503         * platform/graphics/ca/GraphicsLayerCA.h:
2504         Remove an unused member variable.
2505
2506 2012-12-15  Simon Fraser  <simon.fraser@apple.com>
2507
2508         REGRESSION (r137006): TileCache flashes to linen, rather than the background color, when scrolling fast
2509         https://bugs.webkit.org/show_bug.cgi?id=104746
2510
2511         Reviewed by Darin Adler.
2512
2513         Make RenderLayerBacking::updateBackgroundColor() responsible for setting the background
2514         color of the main frame's root layer to the document background color (rather than doing
2515         it in code related to overlay scrollbars, which was crazy). This is only done for platforms
2516         that use a TiledBacking (currently, just Mac).
2517         
2518         Also fix updateBackgroundColor() to not call m_graphicsLayer->setContentsToBackgroundColor()
2519         and then call clearBackgroundColor() right away if the color was transparent.
2520         
2521         * page/FrameView.cpp:
2522         (WebCore::FrameView::recalculateScrollbarOverlayStyle): Remove code that calls documentBackgroundColorDidChange().
2523         * rendering/RenderLayerBacking.cpp:
2524         (WebCore::clipBox): Remove blank linke.
2525         (WebCore::RenderLayerBacking::updateBackgroundColor):
2526         * rendering/RenderLayerCompositor.cpp:
2527         * rendering/RenderLayerCompositor.h:
2528         (RenderLayerCompositor):
2529
2530 2012-12-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
2531
2532         Disambiguate "background color" and "contents as solid color" on GraphicsLayer
2533         https://bugs.webkit.org/show_bug.cgi?id=104842
2534
2535         Reviewed by Simon Fraser.
2536
2537         Rename overloads in GraphicsLayerTextureMapper and GraphicsLayerChromium to account for the rename in GraphicsLayer.
2538
2539         Covered by existing tests.
2540
2541         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2542         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2543         (WebCore::GraphicsLayerTextureMapper::setContentsToSolidColor):
2544         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2545         (GraphicsLayerTextureMapper):
2546         (WebCore::GraphicsLayerTextureMapper::solidColor):
2547         * platform/graphics/texmap/TextureMapperLayer.cpp:
2548         (WebCore::TextureMapperLayer::paintSelf):
2549         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
2550         * platform/graphics/texmap/TextureMapperLayer.h:
2551         (State):
2552
2553 2012-12-13  Simon Fraser  <simon.fraser@apple.com>
2554
2555         Disambiguate "background color" and "contents as solid color" on GraphicsLayer
2556         https://bugs.webkit.org/show_bug.cgi?id=104842
2557
2558         Reviewed by Dean Jackson.
2559
2560         GraphicsLayer failed to be clear about the distinction between
2561         the layer background color, and setting the layer contents
2562         to a color. This caused some recently added tests to fail,
2563         and required some special-casing for the TileCache in
2564         GraphicsLayerCA.
2565         
2566         Separate these two concepts on GraphicsLayer. setBackgroundColor()
2567         now sets the background color on the entire layer, which will only
2568         be used in special cases like the TileCache.
2569         
2570         The existing setContentsToBackgroundColor() is renamed to
2571         setContentsToSolidColor(), and is an explicit request to create
2572         a contents layer for the purpose of displaying a simple color.
2573         
2574         In both cases, 'clear' methods are not necessary; calling
2575         the setter with an invalid color clears the color.
2576
2577         Covered by existing tests.
2578
2579         * WebCore.exp.in: Remove GraphicsLayer::clearBackgroundColor().
2580         * platform/graphics/GraphicsLayer.cpp:
2581         (WebCore::GraphicsLayer::GraphicsLayer):
2582         (WebCore::GraphicsLayer::setBackgroundColor):
2583         (WebCore::GraphicsLayer::dumpProperties):
2584         * platform/graphics/GraphicsLayer.h:
2585         (GraphicsLayer): Remove m_backgroundColorSet; we just check whether
2586         the color is a valid color now.
2587         (WebCore::GraphicsLayer::setContentsToSolidColor):
2588         * platform/graphics/ca/GraphicsLayerCA.cpp:
2589         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2590         (WebCore::GraphicsLayerCA::setBackgroundColor):
2591         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
2592         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2593         (WebCore::GraphicsLayerCA::updateBackgroundColor):
2594         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
2595         (WebCore):
2596         * platform/graphics/ca/GraphicsLayerCA.h:
2597         (GraphicsLayerCA):
2598         * rendering/RenderLayerBacking.cpp:
2599         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): We have
2600         to call updateBackgroundColor(), because the 'is simple compositing layer'
2601         state may change in this code path.
2602         (WebCore::RenderLayerBacking::updateBackgroundColor): Don't initialize
2603         the Color to transparent (it will be invalid initially), and always
2604         call setContentsToSolidColor() which will either set or remove the color.
2605
2606 2012-12-15  Mark Lam  <mark.lam@apple.com>
2607
2608         Re-landing patch for "Introducing the DatabaseStrategy and database servers".
2609         https://bugs.webkit.org/show_bug.cgi?id=104934.
2610
2611         Not reviewed.
2612
2613         Merged from r137767. Previously reviewed by Sam Weinig.
2614         Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.
2615
2616         No new tests.
2617
2618         * CMakeLists.txt:
2619         * GNUmakefile.list.am:
2620         * Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
2621         * Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
2622         * Modules/webdatabase/DatabaseManager.cpp:
2623         (WebCore::DatabaseManager::DatabaseManager):
2624         * Modules/webdatabase/DatabaseManager.h:
2625         (DatabaseManager):
2626         * Target.pri:
2627         * WebCore.exp.in:
2628         * WebCore.gypi:
2629         * WebCore.vcproj/WebCore.vcproj:
2630         * WebCore.xcodeproj/project.pbxproj:
2631         * platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
2632         * platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
2633         * platform/PlatformStrategies.h:
2634         (WebCore::PlatformStrategies::databaseStrategy):
2635         (PlatformStrategies):
2636         (WebCore::PlatformStrategies::PlatformStrategies):
2637
2638 2012-12-14  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
2639
2640         Emphasis mark is printed after inline-block with justify
2641         https://bugs.webkit.org/show_bug.cgi?id=104631
2642
2643         Reviewed by Dean Jackson.
2644
2645         Do not print an emphasis mark after an inline-block when justified.
2646
2647         If an inline-block is expanded, it has a space appended to it.
2648         This space should not have any emphasis marks drawn.
2649
2650         Test: fast/inline/justify-emphasis-inline-box.html
2651
2652         * platform/graphics/SimpleFontData.h:
2653         (WebCore::SimpleFontData::zeroWidthSpaceGlyph): Add getter method to get zero width space glyph.
2654         * platform/graphics/WidthIterator.cpp:
2655         (WebCore::WidthIterator::advanceInternal): We use zero width space for the extra space not to draw emphasis marks.
2656
2657 2012-12-14  Jer Noble  <jer.noble@apple.com>
2658
2659         Unreviewed bug fix after r137782.
2660
2661         Add new source file TextTrackRepresentation.cpp to CMakeLists.txt.
2662
2663         * CMakeLists.txt:
2664
2665 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2666
2667         Unreviewed, rolling out r137767.
2668         http://trac.webkit.org/changeset/137767
2669         https://bugs.webkit.org/show_bug.cgi?id=105062
2670
2671         Broke Mac builds. (Requested by mlam on #webkit).
2672
2673         * CMakeLists.txt:
2674         * GNUmakefile.list.am:
2675         * Modules/webdatabase/AbstractDatabaseServer.h: Removed.
2676         * Modules/webdatabase/DBBackendServer.h: Removed.
2677         * Modules/webdatabase/DatabaseManager.cpp:
2678         (WebCore::DatabaseManager::DatabaseManager):
2679         * Modules/webdatabase/DatabaseManager.h:
2680         * Target.pri:
2681         * WebCore.exp.in:
2682         * WebCore.gypi:
2683         * WebCore.vcproj/WebCore.vcproj:
2684         * WebCore.xcodeproj/project.pbxproj:
2685         * platform/DatabaseStrategy.cpp: Removed.
2686         * platform/DatabaseStrategy.h: Removed.
2687         * platform/PlatformStrategies.h:
2688         (WebCore):
2689         (WebCore::PlatformStrategies::PlatformStrategies):
2690         (PlatformStrategies):
2691
2692 2012-12-14  Jer Noble  <jer.noble@apple.com>
2693
2694         Allow the text track contents to be displayed externally to WebCore.
2695         https://bugs.webkit.org/show_bug.cgi?id=105052
2696
2697         Reviewed by Eric Carlson.
2698
2699         Support scenarios where the text track contents must be rendered outside of WebCore, such as to an external
2700         display or window.  Add an abstract base class which encapsulates the external representation to which the
2701         text tracks will be rendered.
2702
2703         Add a new abstract base class and client to wrap the external rendering of a TextTrack.
2704         * platform/graphics/TextTrackRepresentation.h: Added.
2705         (WebCore::TextTrackRepresentationClient::~TextTrackRepresentationClient):
2706         (WebCore::TextTrackRepresentation::~TextTrackRepresentation):
2707
2708         Add an empty concrete implementation for those ports who do not yet support external display of subtitles.
2709         * platform/graphics/TextTrackRepresentation.cpp: Added.
2710         (NullTextTrackRepresentation):
2711         (WebCore::NullTextTrackRepresentation::~NullTextTrackRepresentation):
2712         (WebCore::NullTextTrackRepresentation::update):
2713         (WebCore::NullTextTrackRepresentation::platformLayer):
2714         (WebCore::NullTextTrackRepresentation::setContentScale):
2715         (WebCore::NullTextTrackRepresentation::bounds):
2716         (WebCore::TextTrackRepresentation::create):
2717
2718         Add methods to MediaPlayerPrivateIOS to handle the TextTrackRepresentation.
2719         * platform/graphics/ios/MediaPlayerPrivateIOS.h:
2720         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
2721         (WebCore::MediaPlayerPrivateIOS::deliverNotification): Remove the representation when exiting full screen.
2722         (WebCore::MediaPlayerPrivateIOS::requiresTextTrackRepresentation): Return YES if in full screen mode.
2723         (WebCore::MediaPlayerPrivateIOS::setTextTrackRepresentation): Pass the representation's layer to the player plug-in.
2724
2725         Expose those methods via HTMLMediaElement:
2726         * html/HTMLMediaElement.cpp:
2727         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation):
2728         (WebCore::HTMLMediaElement::setTextTrackRepresentation):
2729         * html/HTMLMediaElement.h:
2730         * platform/graphics/MediaPlayer.cpp:
2731         (WebCore::MediaPlayer::requiresTextTrackRepresentation):
2732         (WebCore::MediaPlayer::setTextTrackRepresentation):
2733         * platform/graphics/MediaPlayer.h:
2734         (WebCore::MediaPlayerClient::textTrackRepresentationBoundsChanged):
2735         (WebCore::MediaPlayerClient::paintTextTrackRepresentation):
2736         * platform/graphics/MediaPlayerPrivate.h:
2737         (WebCore::MediaPlayerPrivateInterface::requiresTextTrackRepresentation):
2738         (WebCore::MediaPlayerPrivateInterface::setTextTrackRepresentation):
2739
2740         * html/shadow/MediaControlElements.cpp:
2741         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Create the representation, if necessary.
2742         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Use the representation to determine the font size.
2743         (WebCore::MediaControlTextTrackContainerElement::paintTextTrackRepresentation): Added. Paint the TextTrack into the provided graphics context.
2744         (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged): Added. Call updateSizes().
2745         * html/shadow/MediaControlElements.h:
2746
2747         Add the new files to the project.
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * GNUmakefile.list.am:
2750         * Target.pri:
2751         * WebCore.gypi:
2752         * WebCore.vcproj/WebCore.vcproj:
2753
2754 2012-12-14  Fady Samuel  <fsamuel@chromium.org>
2755
2756         Allow embedder to observe changes to frame names
2757         https://bugs.webkit.org/show_bug.cgi?id=104404
2758
2759         Reviewed by Darin Fisher.
2760
2761         * loader/FrameLoaderClient.h:
2762         (WebCore::FrameLoaderClient::didChangeName):
2763         (FrameLoaderClient):
2764         * page/DOMWindow.cpp:
2765         (WebCore::DOMWindow::setName):
2766
2767 2012-12-14  James Simonsen  <simonjam@chromium.org>
2768
2769         [Resource Timing] Properly report reused connections
2770         https://bugs.webkit.org/show_bug.cgi?id=104986
2771
2772         Reviewed by Tony Gentilcore.
2773
2774         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_connection_reuse.html
2775
2776         * page/PerformanceResourceTiming.cpp:
2777         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
2778         (WebCore::PerformanceResourceTiming::connectStart):
2779         (WebCore::PerformanceResourceTiming::connectEnd):
2780         * page/PerformanceResourceTiming.h:
2781         (PerformanceResourceTiming):
2782
2783 2012-12-14  Roger Fong  <roger_fong@apple.com>
2784
2785         Enable video caption controls on Windows.
2786         https://bugs.webkit.org/show_bug.cgi?id=105045.
2787
2788         Reviewed by Eric Carlson.
2789
2790         Now that video tracks have been enabled on Windows, enable controls as well.
2791
2792         * html/shadow/MediaControlElements.cpp:
2793         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
2794         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
2795         * html/shadow/MediaControlElements.h:
2796         * rendering/RenderThemeWin.h:
2797
2798 2012-12-14  Mark Lam  <mark.lam@apple.com>
2799
2800         Introducing the DatabaseStrategy and database servers.
2801         https://bugs.webkit.org/show_bug.cgi?id=104934.
2802
2803         Reviewed by Sam Weinig.
2804
2805         The database server is currently a placeholder that does nothing.
2806
2807         No new tests.
2808
2809         * CMakeLists.txt:
2810         * GNUmakefile.list.am:
2811         * Modules/webdatabase/AbstractDatabaseServer.h: Added.
2812         (WebCore):
2813         (AbstractDatabaseServer):
2814         (WebCore::AbstractDatabaseServer::AbstractDatabaseServer):
2815         (WebCore::AbstractDatabaseServer::~AbstractDatabaseServer):
2816         * Modules/webdatabase/DBBackendServer.h: Added.
2817         (DBBackend):
2818         * Modules/webdatabase/DatabaseManager.cpp:
2819         (WebCore::DatabaseManager::DatabaseManager):
2820         * Modules/webdatabase/DatabaseManager.h:
2821         (WebCore):
2822         (DatabaseManager):
2823         * Target.pri:
2824         * WebCore.exp.in:
2825         * WebCore.gypi:
2826         * WebCore.vcproj/WebCore.vcproj:
2827         * WebCore.xcodeproj/project.pbxproj:
2828         * platform/DatabaseStrategy.cpp: Added.
2829         (WebCore):
2830         (WebCore::DatabaseStrategy::getDatabaseServer):
2831         * platform/DatabaseStrategy.h: Added.
2832         (WebCore):
2833         (DatabaseStrategy):
2834         (WebCore::DatabaseStrategy::~DatabaseStrategy):
2835         * platform/PlatformStrategies.h:
2836         (WebCore):
2837         (WebCore::PlatformStrategies::databaseStrategy):
2838         (PlatformStrategies):
2839         (WebCore::PlatformStrategies::PlatformStrategies):
2840
2841 2012-12-14  Anton Vayvod  <avayvod@chromium.org>
2842
2843         Text Autosizing: Consider inline-block and inline-table elements to be autosizing clusters.
2844         https://bugs.webkit.org/show_bug.cgi?id=104702
2845
2846         Reviewed by Julien Chaffraix.
2847
2848         A common pattern for creating adjacent columns in CSS is to set each of the columns to
2849         display:inline-block, display:inline-table or alike WebKit-specific styles. Whenever columns
2850         are used, Text Autosizing needs to assign each of the columns to different clusters (since
2851         the user can zoom in such that a column fills the width of the screen, so text within a column
2852         should have a smaller multiplier than it's wider enclosing cluster would have needed).
2853
2854         This patch causes display:inline-block, display:inline-table and alike styles to trigger new clusters.
2855
2856         Test: fast/text-autosizing/cluster-inline-block-or-table.html
2857         Test: fast/text-autosizing/cluster-inline-grid-flex-box.html
2858
2859         * rendering/TextAutosizer.cpp:
2860         (WebCore::TextAutosizer::isAutosizingContainer):
2861         (WebCore::TextAutosizer::isAutosizingCluster):
2862             Consider display:inline-block, inline-table and alike elements to be autosizing containers and clusters.
2863
2864 2012-12-14  Anders Carlsson  <andersca@apple.com>
2865
2866         REGRESSION (r137607): Cannot download files, stuck in "Preparing to download"
2867         https://bugs.webkit.org/show_bug.cgi?id=105044
2868         <rdar://problem/12879657>
2869
2870         Reviewed by Alexey Proskuryakov.
2871
2872         Make ResourceHandle::cancel return early if the handle has been converted to a download.
2873
2874         * platform/network/mac/ResourceHandleMac.mm:
2875         (WebCore::ResourceHandle::cancel):
2876
2877 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2878
2879         Unreviewed, rolling out r137570.
2880         http://trac.webkit.org/changeset/137570
2881         https://bugs.webkit.org/show_bug.cgi?id=105048
2882
2883         Stale nodes in the touchEventTarget HashCountedSet are
2884         triggering crashes. Rolling out while I find the root cause.
2885         (Requested by leviw on #webkit).
2886
2887         * dom/Document.cpp:
2888         (WebCore::Document::Document):
2889         (WebCore::Document::didAddTouchEventHandler):
2890         (WebCore::Document::didRemoveTouchEventHandler):
2891         * dom/Document.h:
2892         (WebCore::Document::touchEventHandlerCount):
2893         (Document):
2894         * dom/Node.cpp:
2895         (WebCore::Node::didMoveToNewDocument):
2896         (WebCore::tryAddEventListener):
2897         (WebCore::tryRemoveEventListener):
2898         * history/CachedFrame.cpp:
2899         (WebCore::CachedFrameBase::restore):
2900         * html/HTMLInputElement.cpp:
2901         (WebCore::HTMLInputElement::~HTMLInputElement):
2902         (WebCore::HTMLInputElement::updateType):
2903         * page/DOMWindow.cpp:
2904         (WebCore::DOMWindow::addEventListener):
2905         (WebCore::DOMWindow::removeEventListener):
2906         * page/EventHandler.cpp:
2907         (WebCore::EventHandler::handleTouchEvent):
2908         * page/Frame.cpp:
2909         (WebCore::Frame::setDocument):
2910         * page/scrolling/ScrollingCoordinator.cpp:
2911         * page/scrolling/ScrollingCoordinator.h:
2912         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2913         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
2914         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
2915         (ScrollingCoordinatorChromium):
2916         * testing/Internals.cpp:
2917         (WebCore::Internals::touchEventHandlerCount):
2918         * testing/Internals.h:
2919         (Internals):
2920         * testing/Internals.idl:
2921
2922 2012-12-14  Michelangelo De Simone  <michelangelo@webkit.org>
2923
2924         [CSS Shaders] Remove code for the other mesh box types (border-box | padding-box | content-box)
2925         https://bugs.webkit.org/show_bug.cgi?id=103776
2926
2927         Reviewed by Dean Jackson.
2928
2929         The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly
2930         and therefore this feature - even though it was not fully implemented yet - shall not be used anymore.
2931
2932         In this patch we remove everything but the parsing code, which shall be addressed in a different patch
2933         (see: https://bugs.webkit.org/show_bug.cgi?id=103778).
2934
2935         Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt
2936
2937         Existing tests have been updated and new parsing legacy cases have been added.
2938
2939         * css/CSSComputedStyleDeclaration.cpp:
2940         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2941         * css/CSSParser.cpp:
2942         (WebCore::CSSParser::parseCustomFilter):
2943         * css/CSSPrimitiveValueMappings.h:
2944         * css/StyleResolver.cpp:
2945         (WebCore::StyleResolver::createCustomFilterOperation):
2946         * platform/graphics/filters/CustomFilterConstants.h:
2947         * platform/graphics/filters/CustomFilterOperation.cpp:
2948         (WebCore::CustomFilterOperation::CustomFilterOperation):
2949         (WebCore::CustomFilterOperation::blend):
2950         * platform/graphics/filters/CustomFilterOperation.h:
2951         (WebCore::CustomFilterOperation::create):
2952         (CustomFilterOperation):
2953         (WebCore::CustomFilterOperation::operator==):
2954         * platform/graphics/filters/CustomFilterRenderer.cpp:
2955         (WebCore::CustomFilterRenderer::create):
2956         (WebCore::CustomFilterRenderer::CustomFilterRenderer):
2957         * platform/graphics/filters/CustomFilterRenderer.h:
2958         (CustomFilterRenderer):
2959         * platform/graphics/filters/FECustomFilter.cpp:
2960         (WebCore::FECustomFilter::FECustomFilter):
2961         (WebCore::FECustomFilter::create):
2962         * platform/graphics/filters/FECustomFilter.h:
2963         (FECustomFilter):
2964         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
2965         (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
2966         * platform/graphics/filters/ValidatedCustomFilterOperation.h:
2967         (WebCore::ValidatedCustomFilterOperation::create):
2968         (WebCore::ValidatedCustomFilterOperation::operator==):
2969         (ValidatedCustomFilterOperation):
2970         * rendering/FilterEffectRenderer.cpp:
2971         (WebCore::createCustomFilterEffect):
2972         * rendering/RenderLayer.cpp:
2973         (WebCore::RenderLayer::computeFilterOperations):
2974         * platform/graphics/texmap/TextureMapperGL.cpp:
2975         (WebCore::TextureMapperGL::drawUsingCustomFilter):
2976
2977 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
2978
2979         Web Inspector: optional parameters of protocol commands should go after required ones
2980         https://bugs.webkit.org/show_bug.cgi?id=105019
2981
2982         Reviewed by Pavel Feldman.
2983
2984         * inspector/Inspector.json: Moved required x and y parameters declaration before
2985         optional ones.
2986         * inspector/InspectorInputAgent.cpp:
2987         (WebCore::InspectorInputAgent::dispatchMouseEvent):
2988         * inspector/InspectorInputAgent.h:
2989         (InspectorInputAgent):
2990
2991 2012-12-14  Jessie Berlin  <jberlin@apple.com>
2992
2993         Mac build fix after r137724.
2994
2995         * platform/graphics/MediaPlayer.h:
2996         (WebCore::MediaPlayerClient::mediaPlayerKeyAdded):
2997         Comment out the names of the unused parameters so they don't trigger unused parameter
2998         warnings.
2999         (WebCore::MediaPlayerClient::mediaPlayerKeyError):
3000         Ditto.
3001         (WebCore::MediaPlayerClient::mediaPlayerKeyMessage):
3002         Ditto.
3003         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
3004         Ditto.
3005
3006         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3007         (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest):
3008         Pass an empty URL for the new defaultURL parameter in the keyMessage call.
3009
3010 2012-12-14  Alberto Garcia  <agarcia@igalia.com>
3011
3012         [GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage
3013         https://bugs.webkit.org/show_bug.cgi?id=104910
3014
3015         Reviewed by Martin Robinson.
3016
3017         Add new parameter to GtkAuthenticationDialog to select whether we
3018         allow persistent storage of credential information or not. In the
3019         latter case, the "Remember password" check button is not shown and
3020         the credentials are always stored in the session.
3021
3022         * platform/gtk/GtkAuthenticationDialog.cpp:
3023         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog):
3024         (WebCore::GtkAuthenticationDialog::createContentsInContainer):
3025         (WebCore::GtkAuthenticationDialog::buttonClickedCallback):
3026         * platform/gtk/GtkAuthenticationDialog.h:
3027         (GtkAuthenticationDialog):
3028
3029 2012-12-14  Andrey Kosyakov  <caseq@chromium.org>
3030
3031         Unreviewed, rolling out r129633 and r129757.
3032         http://trac.webkit.org/changeset/129633
3033         http://trac.webkit.org/changeset/129757
3034         https://bugs.webkit.org/show_bug.cgi?id=97659
3035
3036         Causes performance regression whn inspector overlay is
3037         displayed
3038
3039         * inspector/InspectorOverlay.cpp:
3040         (WebCore::InspectorOverlay::paint):
3041
3042 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
3043
3044         Web Inspector: add data grid for exploring native heap graph
3045         https://bugs.webkit.org/show_bug.cgi?id=105012
3046
3047         Reviewed by Pavel Feldman.
3048
3049         Added a view for displaying native heap graph nodes.
3050
3051         * inspector/HeapGraphSerializer.cpp:
3052         (WebCore::HeapGraphSerializer::reportEdge):
3053         * inspector/front-end/NativeMemorySnapshotView.js:
3054         (WebInspector.NativeMemorySnapshotView):
3055         (WebInspector.NativeMemorySnapshotView.prototype._onSelectedViewChanged):
3056         (WebInspector.NativeMemorySnapshotView.prototype.get statusBarItems):
3057         (WebInspector.NativeHeapGraphNode):
3058         (WebInspector.NativeHeapGraphNode.prototype.id):
3059         (WebInspector.NativeHeapGraphNode.prototype.type):
3060         (WebInspector.NativeHeapGraphNode.prototype.size):
3061         (WebInspector.NativeHeapGraphNode.prototype.className):
3062         (WebInspector.NativeHeapGraphNode.prototype.name):
3063         (WebInspector.NativeHeapGraphNode.prototype.hasReferencedNodes):
3064         (WebInspector.NativeHeapGraphNode.prototype.referencedNodes):
3065         (WebInspector.NativeHeapGraphNode.prototype._firstEdgePoistion):
3066         (WebInspector.NativeHeapGraphNode.prototype._afterLastEdgePosition):
3067         (WebInspector.NativeHeapGraphNode.prototype._getStringField):
3068         (WebInspector.NativeHeapGraph):
3069         (WebInspector.NativeHeapGraph.prototype.rootNodes):
3070         (WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
3071         (WebInspector.NativeHeapGraphDataGrid):
3072         (WebInspector.NativeHeapGraphDataGridRoot):
3073         (WebInspector.NativeHeapGraphDataGridRoot.prototype._populate):
3074         (WebInspector.NativeHeapGraphDataGridNode):
3075         (WebInspector.NativeHeapGraphDataGridNode.prototype._populate):
3076         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
3077         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
3078
3079 2012-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
3080
3081         Web Inspector: Native Memory Instrumentation: do not validate InlineFlowBox objects against tcmalloc data.
3082         https://bugs.webkit.org/show_bug.cgi?id=105001
3083
3084         Reviewed by Yury Semikhatsky.
3085
3086         This is a follow-up change for r137589.
3087
3088         * rendering/InlineFlowBox.cpp:
3089         (WebCore::InlineFlowBox::reportMemoryUsage):
3090         (WebCore):
3091         * rendering/InlineFlowBox.h:
3092         (InlineFlowBox):
3093
3094 2012-12-14  Kentaro Hara  <haraken@chromium.org>
3095
3096         ChildNodesLazySnapshot::nextNode() can crash in Debug builds
3097         https://bugs.webkit.org/show_bug.cgi?id=104982
3098
3099         Reviewed by Ryosuke Niwa.
3100
3101         The original fix in r137702 was not enough. r137702 fixed a crash
3102         in Release builds but didn't fix a crash in Debug builds.
3103         We have to also change a return type of ChildNodesLazySnapshot::nextNode()
3104         from a raw pointer to a RefPtr.
3105
3106         Test: fast/dom/insertedIntoDocument-no-crash.html
3107         (Confirm that this test does not crash in Debug builds.)
3108
3109         * dom/ContainerNode.h:
3110         (WebCore::ChildNodesLazySnapshot::nextNode):
3111         * dom/ContainerNodeAlgorithms.cpp:
3112         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
3113         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
3114
3115 2012-12-14  John Mellor  <johnme@chromium.org>
3116
3117         Text Autosizing: Don't autosize unwrappable blocks
3118         https://bugs.webkit.org/show_bug.cgi?id=104925
3119
3120         Reviewed by Julien Chaffraix.
3121
3122         If we autosize an unwrappable block (white-space:nowrap/pre), it'll
3123         expand sideways. This doesn't actually improve its legibility, and it
3124         can often severely break web page layouts. This patch prevents us from
3125         autosizing unwrappable blocks. A follow-up patch will address the more
3126         complex issue of unwrappable inline elements.
3127
3128         Tests: fast/text-autosizing/unwrappable-blocks.html
3129                fast/text-autosizing/unwrappable-inlines.html
3130
3131         * rendering/TextAutosizer.cpp:
3132         (WebCore::TextAutosizer::processContainer):
3133             Use containerShouldbeAutosized instead of contentHeightIsConstrained.
3134         (WebCore::contentHeightIsConstrained):
3135             Unchanged, just moved lower down the file.
3136         (WebCore::TextAutosizer::containerShouldbeAutosized):
3137             Checks that the block is wrappable, and also that contentHeightIsConstrained is false.
3138         (WebCore::TextAutosizer::measureDescendantTextWidth):
3139             Use containerShouldbeAutosized instead of contentHeightIsConstrained.
3140         * rendering/TextAutosizer.h:
3141             Declared containerShouldbeAutosized.
3142
3143 2012-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
3144
3145         Web Inspector: Duplicate scripts appear in workspace when script was referenced by url with a fragment part.
3146         https://bugs.webkit.org/show_bug.cgi?id=105004
3147
3148         Reviewed by Alexander Pavlov.
3149
3150         * inspector/front-end/NetworkUISourceCodeProvider.js:
3151         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
3152
3153 2012-12-14  Kunihiko Sakamoto  <ksakamoto@chromium.org>
3154
3155         Hours field of date/time input UI should respect step attribute
3156         https://bugs.webkit.org/show_bug.cgi?id=104993
3157
3158         Reviewed by Kent Tamura.
3159
3160         This patch makes step-up/-down UI of the hours field respect step attribute when possible.
3161
3162         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
3163
3164         * html/shadow/DateTimeEditElement.cpp:
3165         (WebCore::DateTimeEditBuilder::visitField): Pass step parameters to the hour field constructor.
3166         * html/shadow/DateTimeFieldElements.cpp:
3167         (WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Add Parameters argument.
3168         (WebCore::DateTimeHourFieldElement::create): Ditto.
3169         * html/shadow/DateTimeFieldElements.h:
3170         (DateTimeHourFieldElement): Ditto.
3171
3172 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
3173
3174         Unreviewed. Windows compilation fix after r137728.
3175
3176         * inspector/InspectorAllInOne.cpp:
3177
3178 2012-12-14  Shinya Kawanaka  <shinyak@chromium.org>
3179
3180         [Shadow DOM] ShadowRoot.getElementById() should work outside document.
3181         https://bugs.webkit.org/show_bug.cgi?id=87815
3182
3183         Reviewed by Hajime Morita.
3184
3185         ShadowRoot.getElementById() didn't work if ShadowRoot is outside document. We need to update id when an element
3186         is in ShadowTree event if it is not in document.
3187
3188         For performance reason, we introduce IsInShadowTree flag, which enables us to check isInTreeScope() fast.
3189         This is maintained in Element::insertedInto and removedFrom. Here, we're anxious about performance regression,
3190         however our benchmark result shows this doesn't regress the performance.
3191
3192         I've measured Dromaeo/dom-modify.html and Parser/html5-full-render.html 2 times.
3193
3194         Dromaeo/dom-modify.html
3195              35.21,   35.27 [runs/s] --->   35.76,   35.56 [runs/s]
3196         Parser/html5-full-render.html
3197            4328.51, 4254.94 [ms]     ---> 4277.14, 4222.43 [ms]
3198
3199         Test: fast/dom/shadow/getelementbyid-in-orphan.html
3200
3201         * dom/Element.cpp:
3202         (WebCore::Element::insertedInto):
3203         * dom/Element.h:
3204         (WebCore::Element::updateId):
3205         * dom/Node.cpp:
3206         (WebCore::Node::insertedInto): If the parent node is in shadow tree, this node should be also in the same shadow tree.
3207         Since this node is inserted, parentOrHostNode() will not be null.
3208         (WebCore::Node::removedFrom): When node is removed from ShadowTree, its treeScope() should not be ShadowRoot.
3209         * dom/Node.h:
3210         (Node):
3211         (WebCore::Node::isInShadowTree):
3212         (WebCore::Node::isInTreeScope):
3213
3214 2012-12-14  Antoine Quint  <graouts@apple.com>
3215
3216         LayerTreeAgent should only be enabled upon restore if it was previously in the enabled state
3217         https://bugs.webkit.org/show_bug.cgi?id=104887
3218
3219         Reviewed by Pavel Feldman.
3220
3221         Check that we were previously in the enabled state before re-enabling the agent upon restore,
3222         as suggested by Pavel Feldman in follow-up discussion to https://bugs.webkit.org/show_bug.cgi?id=103513.
3223
3224         * inspector/InspectorLayerTreeAgent.cpp:
3225         (WebCore::InspectorLayerTreeAgent::restore):
3226
3227 2012-12-14  Eugene Klyuchnikov  <eustas@chromium.org>
3228
3229         Web Inspector: CPU Profile: Search in "heavy" mode is very slow.
3230         https://bugs.webkit.org/show_bug.cgi?id=103682
3231
3232         Reviewed by Pavel Feldman.
3233
3234         In "heavy" mode the searchable tree is much larger than original tree.
3235         That is why search can cause watchdog timer fired.
3236
3237         Simple optimization makes search much faster.
3238
3239         * inspector/front-end/CPUProfileView.js:
3240         (WebInspector.CPUProfileView.prototype.searchCanceled):
3241         Fix cleanup.
3242         (WebInspector.CPUProfileView.prototype.matchesQuery):
3243         Precompute regexp.
3244         (WebInspector.CPUProfileView.prototype.performSearch):
3245         Use precomputed regexp instead of generating one on each iteration.
3246
3247 2012-12-13  Yury Semikhatsky  <yurys@chromium.org>
3248
3249         Web Inspector: collect native heap graph and report it to the front-end
3250         https://bugs.webkit.org/show_bug.cgi?id=104888
3251
3252         Reviewed by Pavel Feldman.
3253
3254         Added an option to serialize native heap graph in a format similar to that
3255         of JS heap profiler and send it in reply to getProcessMemoryDistribution
3256         command. This is a first attempt and we likely change the report mechanism to
3257         use a stream instread of sending whole graph at once.
3258
3259         * CMakeLists.txt:
3260         * GNUmakefile.list.am:
3261         * Target.pri:
3262         * WebCore.gypi:
3263         * WebCore.vcproj/WebCore.vcproj:
3264         * WebCore.xcodeproj/project.pbxproj:
3265         * inspector/HeapGraphSerializer.cpp: Added.
3266         (WebCore):
3267         (HeapGraphNode):
3268         (WebCore::HeapGraphNode::HeapGraphNode):
3269         (HeapGraphEdge):
3270         (WebCore::HeapGraphEdge::HeapGraphEdge):
3271         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3272         (WebCore::HeapGraphSerializer::~HeapGraphSerializer):
3273         (WebCore::HeapGraphSerializer::serialize):
3274         (WebCore::HeapGraphSerializer::reportNode):
3275         (WebCore::HeapGraphSerializer::reportEdge):
3276         (WebCore::HeapGraphSerializer::reportLeaf):
3277         (WebCore::HeapGraphSerializer::reportBaseAddress):
3278         (WebCore::HeapGraphSerializer::adjutEdgeTargets):
3279         (WebCore::HeapGraphSerializer::addString):
3280         * inspector/HeapGraphSerializer.h: Copied from Source/WebCore/inspector/InspectorMemoryAgent.h.
3281         (WebCore):
3282         (HeapGraphSerializer):
3283         * inspector/Inspector.json:
3284         * inspector/InspectorMemoryAgent.cpp:
3285         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
3286         * inspector/InspectorMemoryAgent.h:
3287         (InspectorMemoryAgent):
3288         * inspector/MemoryInstrumentationImpl.cpp:
3289         (WebCore::MemoryInstrumentationClientImpl::reportNode):
3290         (WebCore):
3291         (WebCore::MemoryInstrumentationClientImpl::reportEdge):
3292         (WebCore::MemoryInstrumentationClientImpl::reportLeaf):
3293         (WebCore::MemoryInstrumentationClientImpl::reportBaseAddress):
3294         * inspector/MemoryInstrumentationImpl.h:
3295         (WebCore):
3296         (WebCore::MemoryInstrumentationClientImpl::MemoryInstrumentationClientImpl):
3297         (MemoryInstrumentationClientImpl):
3298
3299 2012-12-14  Yoshifumi Inoue  <yosin@chromium.org>
3300
3301         Handling autoscroll in EventHandler should be re-factor
3302         https://bugs.webkit.org/show_bug.cgi?id=104764
3303
3304         Reviewed by Hajime Morita.
3305
3306         This patch introduces new class AutoscrollController for moving autoscroll
3307         and panscroll from EventHandler class for ease of maintenance of
3308         EventHandler and ease of adding autoscroll related features, e.g. autoscroll
3309         during drag-and-drop, autoscoll by gesture.
3310
3311         No new tests. This patch doesn't change behavior.
3312
3313         * CMakeLists.txt: Changed to add page/AutoscrollController.cpp
3314         * GNUmakefile.list.am:  Changed to add page/AutoscrollController.{cpp,h}
3315         * Target.pri:  Changed to add page/AutoscrollController.cpp
3316         * WebCore.gypi: Changed to add page/AutoscrollController.{cpp,h}
3317         * WebCore.vcproj/WebCore.vcproj: Changed to add page/AutoscrollController.{cpp,h}
3318         * WebCore.xcodeproj/project.pbxproj: Changed to add page/AutoscrollController.{cpp,h}
3319         * page/AutoscrollController.cpp: Added.
3320         (WebCore::getMainFrame): Helper function.
3321         (WebCore::AutoscrollController::AutoscrollController): Moved from EventHandler.
3322         (WebCore::AutoscrollController::autoscrollRenderer): Moved from EventHandler.
3323         (WebCore::AutoscrollController::autoscrollInProgress): Moved from EventHandler.
3324         (WebCore::AutoscrollController::startAutoscrollForSelection): Replacement of EventHandler::handleAutoscroll().
3325         (WebCore::AutoscrollController::stopAutoscrollTimer): Moveed from EventHandler.
3326         (WebCore::AutoscrollController::updateAutoscrollRenderer): ditto
3327         (WebCore::AutoscrollController::didPanScrollStart): Added for updating pan scrolling status of main frame.
3328         (WebCore::AutoscrollController::didPanScrollStop): ditto
3329         (WebCore::AutoscrollController::handleMouseReleaseEvent): Extracted from EventHandler.
3330         (WebCore::AutoscrollController::panScrollInProgress): Replacement of EventHandler::m_panScrollInProgress.
3331         (WebCore::AutoscrollController::startPanScrolling): Moved from EventHandler::startPanScrolling()
3332         (WebCore::AutoscrollController::autoscrollTimerFired): Moved from EventHandler::autoscrollTimerFired().
3333         (WebCore::AutoscrollController::startAutoscrollTimer): Moved from EventHandler::startAutoscrollTimer().
3334         (WebCore::AutoscrollController::updatePanScrollState): Moved from EventHandler::updatePanScrollState().
3335         * page/AutoscrollController.h: Added.
3336         (AutoscrollController):
3337         * page/EventHandler.cpp:
3338         (WebCore::EventHandler::EventHandler): Changed autoscroll and panscroll related member variable initializations to m_autoscrollController initialization.
3339         (WebCore::EventHandler::handleMouseDraggedEvent): Changed to call AutoscrollController::startAutoscrollForSelection().
3340         (WebCore::EventHandler::handleMouseReleaseEvent): Changed to remove m_autoscrollInProgress reference.
3341         (WebCore::EventHandler::didPanScrollStart): Added for updating pan scrolling status of main frame.
3342         (WebCore::EventHandler::didPanScrollStop): ditto
3343         (WebCore::EventHandler::startPanScrolling): Changed to call AutoscrollController::startPanScrolling().
3344         (WebCore::EventHandler::autoscrollRenderer): Changed to use AutoscrollController.
3345         (WebCore::EventHandler::updateAutoscrollRenderer): ditto
3346         (WebCore::EventHandler::autoscrollInProgress): ditto
3347         (WebCore::EventHandler::panScrollInProgress): Added to replace m_panScrollInProgress.
3348         (WebCore::EventHandler::stopAutoscrollTimer): Changed to use AutoscrollController.
3349         (WebCore::EventHandler::selectCursor): Changed to use panScrollInProgress().
3350         (WebCore::EventHandler::handleMousePressEvent): Chagned to call AutoscrollController::handleMousePressEvent().
3351         (WebCore::EventHandler::keyEvent): Changed to use panScrollInProgress().
3352         * page/EventHandler.h:
3353         (WebCore::EventHandler::autoscrollController): Added for using main frame's panScrollInProgress().
3354         (WebCore::EventHandler::mouseDownWasInSubframe): Added for AutoscrollController.
3355         * rendering/RenderBox.cpp:
3356         (WebCore::RenderBox::canAutoscroll): Moved from EventHandler.cpp.
3357         (WebCore::RenderBox::findAutoscrollable): Moved from EventHandler.cpp.
3358         * rendering/RenderBox.h:
3359         (RenderBox): Added new functions canAutoscroll() and findAutoscrollable().
3360
3361 2012-12-14  David Dorwin  <ddorwin@chromium.org>
3362
3363         EME v0.1: Report defaultURL in KeyMessage.
3364         https://bugs.webkit.org/show_bug.cgi?id=104284
3365
3366         Reviewed by Darin Fisher.
3367
3368         Passes defaultURL down from the media engine to HTMLMediaElement.
3369         Only Valid URLs will be passed.
3370
3371         No test because Clear Key does not provide a defaultURL (in v0.1).
3372
3373         * html/HTMLMediaElement.cpp:
3374         (WebCore::HTMLMediaElement::mediaPlayerKeyMessage):
3375         * html/HTMLMediaElement.h:
3376         (HTMLMediaElement):
3377         * platform/graphics/MediaPlayer.cpp:
3378         (WebCore::MediaPlayer::keyMessage):
3379         * platform/graphics/MediaPlayer.h:
3380         (WebCore::MediaPlayerClient::mediaPlayerKeyAdded):
3381         (WebCore::MediaPlayerClient::mediaPlayerKeyError):
3382         (WebCore::MediaPlayerClient::mediaPlayerKeyMessage):
3383         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
3384         (MediaPlayer):
3385
3386 2012-12-13  Hajime Morrita  <morrita@google.com>
3387
3388         ContentDistributor and ShadowRootContentDistributionData should use RefPtr to hold elements.
3389         https://bugs.webkit.org/show_bug.cgi?id=104918
3390
3391         Reviewed by Kentaro Hara.
3392
3393         This change turns some raw pointers to RefPtrs.
3394
3395         No new tests. Hard to write reliable fast tests since the error
3396         reproduction needs GC to run in certain timing. Although original
3397         report has a repdocution, it takes a few seconds before crash and
3398         isn't suited for a layout test.
3399
3400         * dom/ShadowRoot.cpp:
3401         (WebCore::ShadowRoot::insertionPointList):
3402         * dom/ShadowRoot.h:
3403         (ShadowRoot):
3404         * html/shadow/ContentDistributor.cpp:
3405         (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList):
3406         (WebCore::ContentDistributor::findInsertionPointFor):
3407         (WebCore::ContentDistributor::distribute):
3408         (WebCore::ContentDistributor::invalidate):
3409         * html/shadow/ContentDistributor.h:
3410         (ShadowRootContentDistributionData):
3411         (ContentDistributor):
3412
3413 2012-12-13  Hajime Morrita  <morrita@google.com>
3414
3415         NodeRenderingContext is slow due to ComposedShadowTreeWalker
3416         https://bugs.webkit.org/show_bug.cgi?id=104332
3417
3418         Reviewed by Dimitri Glazkov.
3419
3420         NodeRenderingContext has some slowness due to the complexity of
3421         ComposedShadowTreeWalker that NRC relies on. This change
3422         creates some fast paths to address such slowness.
3423
3424         = NodeRenderingTraversal module:
3425
3426         This change introduces NodeRenderingTraversal namespace, a sister
3427         of NodeTraversal. NRT consists of a set of tree traversal
3428         functions that is responsible for traversal in NRC.  Before this
3429         change, NRC directly used CSTW. This NRT module hides and narrows
3430         the usage of CSTW.
3431
3432         - Traversals provided by NRT have fast paths. In many case, such traversals
3433           don't need to use CSTW and just goes to neighboring nodes in a plain DOM way.
3434         - It also handles NRC specific traversal concerns like pseudo elements.
3435           CSTW::pseudoAwareNextSibling() and CSTW::pseudoAwarePreviousSibling() are
3436           merged into this module.
3437         - CSTW::ParentTraversalDetails is moved and renamed to
3438