[Autotools] Remove the Canvas Path configuration option
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-22  Zan Dobersek  <zdobersek@igalia.com>
2
3         [Autotools] Remove the Canvas Path configuration option
4         https://bugs.webkit.org/show_bug.cgi?id=107537
5
6         Reviewed by Martin Robinson.
7
8         No new tests - no new testable functionality.
9
10         * GNUmakefile.am: Remove the Automake conditional analysis, the related
11         configuration option is being removed as well.
12         * GNUmakefile.features.am.in: Add the ENABLE_CANVAS_PATH feature define,
13         defaulting to 0 in release builds (but is disabled in development builds
14         of the GTK port as well at the moment).
15
16 2013-01-18  Stephen Chenney  <schenney@chromium.org>
17
18         Asserts when textPath is used with no path
19         https://bugs.webkit.org/show_bug.cgi?id=107324
20
21         Reviewed by Eric Seidel.
22
23         We assert when there is no path associated with an SVG text path
24         element. Instead, this patch detects the condition and stops trying to
25         layout text for that textPath  element.
26
27         Test: svg/text/tpath-without-path.svg
28
29         * rendering/svg/SVGTextLayoutEngine.cpp:
30         (WebCore::SVGTextLayoutEngine::beginTextPathLayout):
31         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
32
33 2013-01-22  Andrey Adaikin  <aandrey@chromium.org>
34
35         Web Inspector: [Canvas] jump to prev/next drawing call in the replay
36         https://bugs.webkit.org/show_bug.cgi?id=107551
37
38         Reviewed by Pavel Feldman.
39
40         Implement jumping to the next(previous) drawing call in the WebGL and canvas 2D replay.
41
42         * English.lproj/localizedStrings.js:
43         * inspector/InjectedScriptCanvasModuleSource.js:
44         (.):
45         * inspector/Inspector.json:
46         * inspector/front-end/CanvasProfileView.js:
47         (WebInspector.CanvasProfileView):
48         (WebInspector.CanvasProfileView.prototype.dispose):
49         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
50         * inspector/front-end/canvasProfiler.css:
51         (.canvas-replay-prev-draw img):
52         (.canvas-replay-next-draw img):
53
54 2013-01-22  Andrey Lushnikov  <lushnikov@chromium.org>
55
56         Web Inspector: remove asynchronous behavior from DTE paintLines method
57         https://bugs.webkit.org/show_bug.cgi?id=107550
58
59         Reviewed by Pavel Feldman.
60
61         Remove paintLinesOperationCredit and all asynchronous behaviour from paintLines method;
62         also, remove paintLineChunks method.
63
64         * inspector/front-end/DefaultTextEditor.js:
65         (WebInspector.TextEditorMainPanel.prototype.expandChunks):
66         (WebInspector.TextEditorMainPanel.prototype._highlightDataReady):
67         (WebInspector.TextEditorMainPanel.prototype._paintLines):
68         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
69         (WebInspector.TextEditorMainPanel.prototype._paintLine):
70         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
71
72 2013-01-22  Eugene Klyuchnikov  <eustas@chromium.org>
73
74         Web Inspector: [Network] "Secure" cookies can not be deleted.
75         https://bugs.webkit.org/show_bug.cgi?id=107543
76
77         Reviewed by Pavel Feldman.
78
79         To delete secure cookie URL schema need to be "https" instead of "http".
80
81         * inspector/front-end/CookieItemsView.js:
82         (WebInspector.CookieItemsView.prototype._deleteCookie):
83         Take care of secure cookies.
84
85 2013-01-22  Sheriff Bot  <webkit.review.bot@gmail.com>
86
87         Unreviewed, rolling out r140420.
88         http://trac.webkit.org/changeset/140420
89         https://bugs.webkit.org/show_bug.cgi?id=107557
90
91         Still causes crashes (EFL this time) (Requested by kov on
92         #webkit).
93
94         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
95         * platform/graphics/gstreamer/GStreamerVersioning.h:
96         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
97         (StreamingClient):
98         (_WebKitWebSrcPrivate):
99         (webKitWebSrcFinalize):
100         (webKitWebSrcStop):
101         (StreamingClient::didReceiveData):
102         * platform/network/ResourceHandleClient.h:
103         (ResourceHandleClient):
104         * platform/network/ResourceHandleInternal.h:
105         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
106         (ResourceHandleInternal):
107         * platform/network/soup/ResourceHandleSoup.cpp:
108         (WebCore::cleanupSoupRequestOperation):
109         (WebCore::nextMultipartResponsePartCallback):
110         (WebCore::sendRequestCallback):
111         (WebCore::readCallback):
112
113 2013-01-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
114
115         [Qt] Crash in PasteboardQt.cpp Pasteboard::writeSelection
116         https://bugs.webkit.org/show_bug.cgi?id=102192
117
118         Patch by Fabien Valée
119         Reviewed by Jocelyn Turcotte.
120
121         QClipboard::setMimeData transfers ownership of QMimeData to the clipboard,
122         so we should not access it afterwards.
123
124         * platform/qt/PasteboardQt.cpp:
125         (WebCore::Pasteboard::writeSelection):
126         (WebCore::Pasteboard::writePlainText):
127
128 2013-01-22  Christophe Dumez  <christophe.dumez@intel.com>
129
130         Regression(r140414): It is causing crashes with gstreamer 0.10
131         https://bugs.webkit.org/show_bug.cgi?id=107554
132
133         Reviewed by Philippe Normand.
134
135         gstreamer 0.10 doc led me to believe that gst_element_factory_make()
136         was not returning a floating reference. However, based on testing
137         (and results on Qt port) it does so we should NOT adopt the
138         returned GstElement object.
139
140         No new tests, already covered by existing tests.
141
142         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
143
144 2013-01-22  Andrey Lushnikov  <lushnikov@chromium.org>
145
146         Web Inspector: do not highlight really long lines in DTE.
147         https://bugs.webkit.org/show_bug.cgi?id=107531
148
149         Reviewed by Pavel Feldman.
150
151         Improve TextEditorHighlighter.orderedRangesPerLine method to return
152         only ranges that start before particular column.
153
154         Test: inspector/editor/text-editor-long-line.html
155
156         * inspector/front-end/TextEditorHighlighter.js:
157         (WebInspector.TextEditorHighlighter):
158         (WebInspector.TextEditorHighlighter.prototype.setHighlightLineLimit):
159         (WebInspector.TextEditorHighlighter.prototype.orderedRangesPerLine.comparator):
160         (WebInspector.TextEditorHighlighter.prototype.orderedRangesPerLine):
161
162 2013-01-22  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
163
164         [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying
165         https://bugs.webkit.org/show_bug.cgi?id=105552
166
167         Reviewed by Philippe Normand.
168
169         Makes it possible for the GStreamer media backend to provide the buffer to which
170         the Soup networking backend will use to download data to. This makes copying
171         memory unnecessary when ResourceHandle hands data over to the media player's
172         StreamingClient. Thanks to Dan Winship for help designing the interface.
173
174         No behaviour change, covered by existing tests.
175
176         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
177         (createGstBufferForData): New helper to create a GstBuffer when
178         we have a data pointer and a length.
179         (getGstBufferSize): Abstract obtaining the size of the buffer, so the code
180         is cleaner while still working for both GST 0.10 and 1.0.
181         (setGstBufferSize): Ditto, but for setting the size.
182         (getGstBufferDataPointer): Ditto, but for grabbing the data pointer.
183         (mapGstBuffer): Convenience method to take care of mapping the buffer so that
184         we can provide the data pointer to ResourceHandle.
185         (unmapGstBuffer): Convenience method which takes care of unmapping the buffer
186         and properly freeing the GstMapInfo.
187         * platform/graphics/gstreamer/GStreamerVersioning.h:
188         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
189         (StreamingClient): New methods.
190         (_WebKitWebSrcPrivate): We now store the GstBuffer we provided the data pointer from
191         so we can later unmap it and push it to the pipeline.
192         (webKitWebSrcDispose): Deal with the GstBuffer in case it exists when the source is
193         destroyed.
194         (webKitWebSrcStop): Also clear the GstBuffer in this case.
195         (StreamingClient::didReceiveData): Handle the hand-over of the buffer.
196         (StreamingClient::getBuffer): Provide ResourceHandle with a new GstBuffer's data pointer.
197         * platform/network/ResourceHandleClient.h:
198         (ResourceHandleClient):
199         (WebCore::ResourceHandleClient::ResourceHandleClient): Constructor to initialize the buffer
200         member variable to 0.
201         (WebCore::ResourceHandleClient::~ResourceHandleClient): Destructor to free the buffer if it
202         has been allocated.
203         (WebCore::ResourceHandleClient::getBuffer): Default implementation which returns a
204         newly allocated char pointer.
205         * platform/network/ResourceHandleInternal.h:
206         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
207         (ResourceHandleInternal): Store actual buffer size, which is no longer a constant.
208         * platform/network/soup/ResourceHandleSoup.cpp:
209         (WebCore::cleanupSoupRequestOperation): Clear the buffer pointer, the life-cycle of the
210         buffer is handled by the ResourceHandleClient.
211         (WebCore::nextMultipartResponsePartCallback): Get a new buffer from the client before reading.
212         (WebCore::sendRequestCallback): Ditto.
213         (WebCore::readCallback): Ditto.
214
215 2013-01-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
216
217         [EFL] Fix context menu localized string
218         https://bugs.webkit.org/show_bug.cgi?id=107536
219
220         One of localized string has a marker. Since EFL port does not support them
221         it has to be removed, so the string will be displayed properly.
222
223         Reviewed by Laszlo Gombos.
224
225         * platform/efl/LocalizedStringsEfl.cpp:
226         (WebCore::contextMenuItemTagCheckSpellingWhileTyping)
227
228 2013-01-22  Sheriff Bot  <webkit.review.bot@gmail.com>
229
230         Unreviewed, rolling out r140412.
231         http://trac.webkit.org/changeset/140412
232         https://bugs.webkit.org/show_bug.cgi?id=107549
233
234         Broke rendering of buttons on gmail (Requested by carewolf on
235         #webkit).
236
237         * platform/graphics/qt/TransparencyLayer.h:
238         (WebCore::TransparencyLayer::TransparencyLayer):
239
240 2013-01-22  Christophe Dumez  <christophe.dumez@intel.com>
241
242         [gstreamer] MediaPlayerPrivateGStreamer should take ownership of the playbin
243         https://bugs.webkit.org/show_bug.cgi?id=107445
244
245         Reviewed by Philippe Normand.
246
247         In gstreamer 1.0, gst_element_factory_make() now returns a floating reference.
248         MediaPlayerPrivateGStreamer calls gst_element_factory_make() to create the
249         playbin object but does not take ownership of the object. As a consequence,
250         the object keeps floating until it is unref'd in the
251         MediaPlayerPrivateGStreamer destructor.
252
253         This patch uses a GRefPtr<GstElement> to store the playbin object and only
254         adopt the object returned by gst_element_factory_make() if gstreamer 0.10
255         is used. When gstreamer 1.0 is used, the returned object will not be adopted,
256         which will remove the floating reference. This way, we ensure that the
257         playbin object is owned by MediaPlayerPrivateGStreamer.
258
259         No new tests, no behavior change for layout tests.
260
261         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
262         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
263         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
264         (WebCore::MediaPlayerPrivateGStreamer::load):
265         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
266         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
267         (WebCore::MediaPlayerPrivateGStreamer::duration):
268         (WebCore::MediaPlayerPrivateGStreamer::seek):
269         (WebCore::MediaPlayerPrivateGStreamer::paused):
270         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
271         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
272         (WebCore::MediaPlayerPrivateGStreamer::setVolume):
273         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVolumeChange):
274         (WebCore::MediaPlayerPrivateGStreamer::setRate):
275         (WebCore::MediaPlayerPrivateGStreamer::buffered):
276         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
277         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
278         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
279         (MediaPlayerPrivateGStreamer):
280
281 2013-01-22  Yury Semikhatsky  <yurys@chromium.org>
282
283         Unreviewed. Fix closure compiler warning in inspector front-end after r140390.
284
285         * inspector/front-end/HeapSnapshotView.js:
286
287 2013-01-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
288
289         [Qt] Box shadows on a transparency layer is very slow
290         https://bugs.webkit.org/show_bug.cgi?id=107547
291
292         Reviewed by Noam Rosenthal.
293
294         Set an initial clip on the transparency layer, so that the clipping
295         bounds will never end up larger than the layer.
296
297         * platform/graphics/qt/TransparencyLayer.h:
298         (WebCore::TransparencyLayer::TransparencyLayer):
299
300 2013-01-22  Matt Falkenhagen  <falken@chromium.org>
301
302         Move top layer flag from ElementRareData to NodeFlags
303         https://bugs.webkit.org/show_bug.cgi?id=107542
304
305         Reviewed by Hajime Morita.
306
307         This is a speculative fix for a perf regression (https://bugs.webkit.org/show_bug.cgi?id=106726)
308         likely due to checking the top layer flag in Element::removedFrom. It
309         also simplifies code dealing with top layer and makes it no longer
310         necessary to allocate rare data for top layer.
311
312         * dom/Element.cpp:
313         (WebCore::Element::removedFrom): Check isInTopLayer first in case it helps fix the perf regression.
314         (WebCore):
315         * dom/Element.h: Move top layer functions from Element to Node.
316         * dom/ElementRareData.h:
317         (ElementRareData):
318         (WebCore::ElementRareData::ElementRareData): Remove top layer flag from ElementRareData.
319         * dom/Node.cpp: Move top layer functions from Element to Node.  
320         (WebCore):
321         (WebCore::Node::setIsInTopLayer):
322         * dom/Node.h:
323         (Node):
324         (WebCore::Node::isInTopLayer):
325         * dom/NodeRenderingContext.cpp: Remove unnecessary casts to Element for isInTopLayer().
326         (WebCore::isRendererReparented):
327         (WebCore::NodeRenderingContext::previousRenderer):
328         (WebCore::NodeRenderingContext::parentRenderer):
329         * rendering/RenderLayer.cpp: Ditto.
330         (WebCore::RenderLayer::isInTopLayer):
331         (WebCore::RenderLayer::rebuildZOrderLists):
332
333 2013-01-22  Mark Lam  <mark.lam@apple.com>
334
335         Fix broken mac builds due to <http://trac.webkit.org/changeset/140399>.
336         https://bugs.webkit.org/show_bug.cgi?id=100710.
337
338         Not reviewed.
339
340         No new tests.
341
342         * WebCore.xcodeproj/project.pbxproj:
343
344 2013-01-22  Dan Carney  <dcarney@google.com>
345
346         [v8] Convert string conversion calls to one byte versions
347         https://bugs.webkit.org/show_bug.cgi?id=107524
348
349         Reviewed by Kentaro Hara.
350
351         No new tests. No change in functionality.
352
353         * bindings/v8/SerializedScriptValue.cpp:
354         * bindings/v8/V8StringResource.cpp:
355         (WebCore::WebCoreStringResourceBase::toWebCoreStringResourceBase):
356         (StringTraits):
357         (WebCore::true):
358         (WebCore::v8StringToWebCoreString):
359
360 2013-01-22  Eugene Klyuchnikov  <eustas@chromium.org>
361
362         Web Inspector: [Network] CookiesTable refactoring.
363         https://bugs.webkit.org/show_bug.cgi?id=107511
364
365         Reviewed by Pavel Feldman.
366
367         CookiesTable uses integer indexes as column identifiers.
368         This leads to cryptic code.
369
370         Descriptive column identifiers will make code clearer.
371         Also "addCookiesFolder" replaced with "setCookieFolders" to avoid
372         repetitive "_rebuildTable" invocation.
373
374         * inspector/front-end/CookiesTable.js:
375         (WebInspector.CookiesTable): Use descriptive column identifiers.
376         (WebInspector.CookiesTable.prototype.setCookieFolders):
377         Accept multiple folders.
378         (WebInspector.CookiesTable.prototype._rebuildTable):
379         Use descriptive column identifiers.
380         (WebInspector.CookiesTable.prototype._sortCookies):
381         Ditto.
382         (WebInspector.CookiesTable.prototype._createGridNode):
383         Ditto.
384         * inspector/front-end/RequestCookiesView.js:
385         (WebInspector.RequestCookiesView.prototype._buildCookiesTable):
386         Use "setCookieFolders".
387
388 2013-01-22  Zan Dobersek  <zdobersek@igalia.com>
389
390         [GTK] Disable support for unprefixed CSS animations, transitions, transforms in release builds
391         https://bugs.webkit.org/show_bug.cgi?id=107436
392
393         Reviewed by Alexis Menard.
394
395         Disable the unprefixed CSS animations, transitions and transforms support
396         in the release builds for now. The work in this area is not yet complete
397         and should not ship in such state.
398
399         No new tests - no new functionality.
400
401         * GNUmakefile.features.am.in:
402
403 2013-01-22  Alexander Pavlov  <apavlov@chromium.org>
404
405         Web Inspector: [REGRESSION] SASSSourceMapping broken: _bindUISourceCode method is absent
406         https://bugs.webkit.org/show_bug.cgi?id=107529
407
408         Reviewed by Pavel Feldman.
409
410         * inspector/front-end/SASSSourceMapping.js:
411         (WebInspector.SASSSourceMapping.prototype._fileSaveFinished):
412
413 2013-01-22  Adam Barth  <abarth@webkit.org>
414
415         AtomicMarkupTokenBase must die
416         https://bugs.webkit.org/show_bug.cgi?id=107513
417
418         Reviewed by Eric Seidel.
419
420         Now that NEW_XML has been removed from the tree, there is no reason to
421         have AtomicMarkupTokenBase exist as a templated base class for
422         AtomicHTMLToken. This patch just merges the code back into
423         AtomicHTMLToken.
424
425         * html/parser/HTMLToken.h:
426         (AtomicHTMLToken):
427         (WebCore::AtomicHTMLToken::type):
428         (WebCore::AtomicHTMLToken::name):
429         (WebCore::AtomicHTMLToken::setName):
430         (WebCore::AtomicHTMLToken::selfClosing):
431         (WebCore::AtomicHTMLToken::getAttributeItem):
432         (WebCore::AtomicHTMLToken::attributes):
433         (WebCore::AtomicHTMLToken::characters):
434         (WebCore::AtomicHTMLToken::charactersLength):
435         (WebCore::AtomicHTMLToken::isAll8BitData):
436         (WebCore::AtomicHTMLToken::comment):
437         (WebCore::AtomicHTMLToken::publicIdentifier):
438         (WebCore::AtomicHTMLToken::systemIdentifier):
439         (WebCore::AtomicHTMLToken::clearExternalCharacters):
440         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
441         (WebCore::AtomicMarkupTokenBase::initializeAttributes):
442         (WebCore):
443         * xml/parser/MarkupTokenBase.h:
444
445 2013-01-22  Eric Seidel  <eric@webkit.org>
446
447         Turn on ENABLE_THREADED_HTML_PARSER for Chromium (it's still disabled at runtime)
448         https://bugs.webkit.org/show_bug.cgi?id=107519
449
450         Reviewed by Adam Barth.
451
452         Add some ASSERTs to be double-dog-sure that we're never using
453         any of the threading code when threading is not enabled.
454
455         I also removed an if-branch in the !ENABLE_THREADED_HTML_PARSER case
456         as it's not needed.
457
458         * html/parser/HTMLDocumentParser.cpp:
459         (WebCore::HTMLDocumentParser::prepareToStopParsing):
460         (WebCore::HTMLDocumentParser::startBackgroundParser):
461         (WebCore::HTMLDocumentParser::stopBackgroundParser):
462
463 2013-01-22  Kentaro Hara  <haraken@chromium.org>
464
465         [V8] Make an Isolate parameter mandatory in toV8()
466         https://bugs.webkit.org/show_bug.cgi?id=107520
467
468         Reviewed by Adam Barth.
469
470         Now it's safe to remove an optional Isolate parameter.
471
472         No tests. No change in behavior.
473
474         * bindings/scripts/CodeGeneratorV8.pm:
475         (GenerateHeader):
476         * bindings/scripts/test/V8/V8Float64Array.h:
477         (WebCore::toV8):
478         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
479         (WebCore::toV8):
480         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
481         (WebCore::toV8):
482         * bindings/scripts/test/V8/V8TestEventConstructor.h:
483         (WebCore::toV8):
484         * bindings/scripts/test/V8/V8TestEventTarget.h:
485         (WebCore::toV8):
486         * bindings/scripts/test/V8/V8TestException.h:
487         (WebCore::toV8):
488         * bindings/scripts/test/V8/V8TestInterface.h:
489         (WebCore::toV8):
490         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
491         (WebCore::toV8):
492         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
493         (WebCore::toV8):
494         * bindings/scripts/test/V8/V8TestNode.h:
495         (WebCore::toV8):
496         * bindings/scripts/test/V8/V8TestObj.h:
497         (WebCore::toV8):
498         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
499         (WebCore::toV8):
500         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
501         (WebCore::toV8):
502         * css/MediaQueryListListener.cpp:
503         (WebCore::MediaQueryListListener::queryChanged):
504         * testing/v8/WebCoreTestSupport.cpp:
505         (WebCoreTestSupport::injectInternalsObject):
506
507 2013-01-22  Mihnea Ovidenie  <mihnea@adobe.com>
508
509         [CSS Regions] min-max height will not trigger a relayout when set on a region with auto-height
510         https://bugs.webkit.org/show_bug.cgi?id=103738
511
512         Reviewed by David Hyatt.
513
514         When the style of an auto-height region changes with different min/max-height, we have to make sure
515         that the 2-pass layout algorithm is run so that the region height is properly computed. When doing a 2-pass layout 
516         for auto-height regions, we have to make sure that in the first pass, all auto-height regions start without a previously
517         computed overrideLogicalContentHeight, otherwise we may end-up with incorrect results, illustrated by tests
518         autoheight-two-pass-layout-complex-001.html and autoheight-two-pass-layout-complex-002.html.
519
520         If we do not have auto height regions, a single pass layout in enough to correctly flow content inside regions.
521         When we have auto height regions, the algorithm to lay out content should be:
522         1. If the flow thread content does not need lay out, we do a single pass layout.
523         If during the layout, an auto-height region needs layout or a normal (not auto height) region changes its box dimensions,
524         we need to perform a new 2-pass layout after this layout completes. If not, we bail out and skip step 2.
525         2. Do a full two pass layout and make sure that all auto height regions start the 2-pass layout without a previously computed
526         override logical content height.
527
528         Tests: fast/regions/autoheight-region-decrease-maxheight.html
529                fast/regions/autoheight-region-decrease-minheight.html
530                fast/regions/autoheight-region-decrease-width.html
531                fast/regions/autoheight-region-increase-maxheight.html
532                fast/regions/autoheight-region-increase-minheight.html
533                fast/regions/autoheight-region-increase-width.html
534                fast/regions/autoheight-region-new-maxheight-vrl.html
535                fast/regions/autoheight-region-new-maxheight.html
536                fast/regions/autoheight-region-new-minheight-vlr.html
537                fast/regions/autoheight-region-new-minheight.html
538                fast/regions/autoheight-region-remove-maxheight.html
539                fast/regions/autoheight-region-remove-minheight.html
540                fast/regions/autoheight-two-pass-layout-complex-001.html
541                fast/regions/autoheight-two-pass-layout-complex-002.html
542                fast/regions/region-height-auto-to-defined.html
543                fast/regions/region-height-defined-to-auto.html
544
545         * rendering/FlowThreadController.cpp: Added a flag that is needed to mark whether we need a full 2-pass layout.
546         (WebCore::FlowThreadController::FlowThreadController):
547         * rendering/FlowThreadController.h:
548         (WebCore::FlowThreadController::needsTwoPassLayoutForAutoHeightRegions):
549         (WebCore::FlowThreadController::setNeedsTwoPassLayoutForAutoHeightRegions):
550         * rendering/RenderFlowThread.cpp:
551         (WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight): Use invalidateRegions because we need also to mark the flow thread as needing layout.
552         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
553         * rendering/RenderRegion.cpp:
554         (WebCore::RenderRegion::layout): Make sure we do a 2-pass layout if needed.
555         * rendering/RenderView.cpp:
556         (WebCore::RenderView::layoutContentInAutoLogicalHeightRegions): Added a new function that models the layout algorithm for the case when we have auto height regions
557         and flow threads.
558         (WebCore::RenderView::layout):
559         (WebCore::RenderView::checkTwoPassLayoutForAutoHeightRegions):
560         * rendering/RenderView.h:
561
562 2013-01-22  Adam Barth  <abarth@webkit.org>
563
564         ENABLE(NEW_XML) isn't used by anyone and no one is actively working on it
565         https://bugs.webkit.org/show_bug.cgi?id=100710
566
567         Reviewed by Eric Seidel.
568
569         As discussed on webkit-dev
570         <http://lists.webkit.org/pipermail/webkit-dev/2012-August/022103.html>,
571         ENABLE(NEW_XML) isn't used by anyone and no one is actively working on
572         it. We should remove it from the code base for the time being. If folks
573         want to work on it again, we can restore it from SVN history.
574
575         * GNUmakefile.list.am:
576         * Target.pri:
577         * WebCore.gypi:
578         * WebCore.vcproj/WebCore.vcproj:
579         * WebCore.xcodeproj/project.pbxproj:
580         * dom/Document.cpp:
581         (WebCore::Document::createParser):
582         * dom/DocumentFragment.cpp:
583         (WebCore::DocumentFragment::parseXML):
584         * xml/parser/NewXMLDocumentParser.cpp: Removed.
585         * xml/parser/NewXMLDocumentParser.h: Removed.
586         * xml/parser/XMLCharacterReferenceParser.cpp: Removed.
587         * xml/parser/XMLCharacterReferenceParser.h: Removed.
588         * xml/parser/XMLToken.h: Removed.
589         * xml/parser/XMLTokenizer.cpp: Removed.
590         * xml/parser/XMLTokenizer.h: Removed.
591         * xml/parser/XMLTreeBuilder.cpp: Removed.
592         * xml/parser/XMLTreeBuilder.h: Removed.
593
594 2013-01-22  Kentaro Hara  <haraken@chromium.org>
595
596         [V8] Pass an Isolate to toV8() of event listeners
597         https://bugs.webkit.org/show_bug.cgi?id=107517
598
599         Reviewed by Adam Barth.
600
601         By using Context::GetIsolate(), this patch passes an Isolate to toV8().
602         I think this would be the last patch to pass an Isolate to toV8().
603         In the next patch, I will make an Isolate parameter mandatory for toV8().
604
605         No tests. No change in behavior.
606
607         * bindings/v8/V8AbstractEventListener.cpp:
608         (WebCore::V8AbstractEventListener::getReceiverObject):
609         * bindings/v8/V8AbstractEventListener.h:
610         (V8AbstractEventListener):
611         * bindings/v8/V8EventListener.cpp:
612         (WebCore::V8EventListener::callListenerFunction):
613         * bindings/v8/V8LazyEventListener.cpp:
614         (WebCore::toObjectWrapper):
615         (WebCore::V8LazyEventListener::callListenerFunction):
616         (WebCore::V8LazyEventListener::prepareListenerObject):
617         * bindings/v8/V8WorkerContextEventListener.cpp:
618         (WebCore::V8WorkerContextEventListener::getReceiverObject):
619
620 2013-01-22  Tim Horton  <timothy_horton@apple.com>
621
622         PDFPlugin: Build PDFPlugin everywhere, enable at runtime
623         https://bugs.webkit.org/show_bug.cgi?id=107117
624
625         Reviewed by Alexey Proskuryakov.
626
627         Since PDFLayerController SPI is all forward-declared, the plugin should build
628         on all Mac platforms, and can be enabled at runtime.
629
630         * Configurations/FeatureDefines.xcconfig:
631
632 2013-01-22  Dominic Mazzoni  <dmazzoni@google.com>
633
634         AX: Should assert if we try to create two AXObjects that point to the same renderer or node
635         https://bugs.webkit.org/show_bug.cgi?id=107504
636
637         Reviewed by Chris Fleizach.
638
639         If two accessibility objects get created that point to the
640         same widget, renderer, or node, that can lead to crashes or
641         memory corruption later; make it assert instead of crashing.
642
643         * accessibility/AXObjectCache.cpp:
644         (WebCore::AXObjectCache::getOrCreate):
645
646 2013-01-22  Kentaro Hara  <haraken@chromium.org>
647
648         [V8] Pass an Isolate to toV8()
649         https://bugs.webkit.org/show_bug.cgi?id=107512
650
651         Reviewed by Adam Barth.
652
653         By using Context::GetIsolate(), this patch passes an Isolate to toV8().
654
655         No tests. No change in behavior.
656
657         * bindings/v8/IDBBindingUtilities.cpp:
658         (WebCore::injectIDBKeyIntoScriptValue):
659         (WebCore::idbKeyToScriptValue):
660         * bindings/v8/ScriptController.cpp:
661         (WebCore::createScriptObject):
662         (WebCore::ScriptController::createScriptObjectForPluginElement):
663         * bindings/v8/ScriptDebugServer.cpp:
664         (WebCore::ScriptDebugServer::currentCallFrame):
665         * bindings/v8/ScriptObject.cpp:
666         (WebCore::ScriptGlobalObject::set):
667         * bindings/v8/V8AbstractEventListener.cpp:
668         (WebCore::V8AbstractEventListener::handleEvent):
669         * bindings/v8/V8DOMWindowShell.cpp:
670         (WebCore::V8DOMWindowShell::updateDocumentProperty):
671         * bindings/v8/V8MutationCallback.cpp:
672         (WebCore::V8MutationCallback::handleEvent):
673         * bindings/v8/V8NodeFilterCondition.cpp:
674         (WebCore::V8NodeFilterCondition::acceptNode):
675         * bindings/v8/V8WorkerContextEventListener.cpp:
676         (WebCore::V8WorkerContextEventListener::handleEvent):
677         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
678         (WebCore::V8SQLStatementErrorCallback::handleEvent):
679         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
680         (WebCore::InjectedScriptHost::nodeAsScriptValue):
681
682 2013-01-22  Sergey Ryazanov  <serya@chromium.org>
683
684         Web Inspector: Show requests in `curl` syntax in DevTools → Network → Headers
685         https://bugs.webkit.org/show_bug.cgi?id=107276
686
687         Reviewed by Pavel Feldman.
688
689         Test: inspector/curl-command.html
690
691         * inspector/front-end/NetworkPanel.js:
692         (WebInspector.NetworkLogView.prototype._generateCurlCommand):
693
694 2013-01-22  Yury Semikhatsky  <yurys@chromium.org>
695
696         Web Inspector: reuse JS heap profiler UI for native heap graph representaion
697         https://bugs.webkit.org/show_bug.cgi?id=107452
698
699         Reviewed by Pavel Feldman.
700
701         NativeHeapSnapshot is introduced to leverage JS heap snapshot processing algorithms
702         for native heap graph. New snapshot type ("Native Heap Snapshot") is added to the
703         profiles panel. It will represent native heap snapshots using the same UI as we use
704         for JS heap snapshots.
705
706         * WebCore.gypi:
707         * WebCore.vcproj/WebCore.vcproj:
708         * inspector/compile-front-end.py:
709         * inspector/front-end/HeapSnapshot.js:
710         (WebInspector.HeapSnapshot):
711         (WebInspector.HeapSnapshot.prototype._init):
712         * inspector/front-end/HeapSnapshotProxy.js:
713         (WebInspector.HeapSnapshotWorker):
714         * inspector/front-end/HeapSnapshotView.js:
715         (WebInspector.HeapProfileHeader.prototype.load):
716         (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer): extracted a few methods
717         to support overrides for native heap snapshots.
718         (WebInspector.HeapProfileHeader.prototype.snapshotConstructorName):
719         (WebInspector.HeapProfileHeader.prototype._setupWorker):
720         * inspector/front-end/NativeHeapSnapshot.js: Added.
721         (WebInspector.NativeHeapSnapshot):
722         (WebInspector.NativeHeapSnapshot.prototype.createNode):
723         (WebInspector.NativeHeapSnapshot.prototype.createEdge):
724         (WebInspector.NativeHeapSnapshot.prototype.createRetainingEdge):
725         (WebInspector.NativeHeapSnapshot.prototype._markInvisibleEdges):
726         (WebInspector.NativeHeapSnapshot.prototype._calculateFlags):
727         (WebInspector.NativeHeapSnapshot.prototype.canHaveDistanceOne):
728         (WebInspector.NativeHeapSnapshot.prototype.userObjectsMapAndFlag):
729         (WebInspector.NativeHeapSnapshotNode):
730         (WebInspector.NativeHeapSnapshotNode.prototype.canBeQueried):
731         (WebInspector.NativeHeapSnapshotNode.prototype.isUserObject):
732         (WebInspector.NativeHeapSnapshotNode.prototype.className):
733         (WebInspector.NativeHeapSnapshotNode.prototype.classIndex):
734         (WebInspector.NativeHeapSnapshotNode.prototype.id):
735         (WebInspector.NativeHeapSnapshotNode.prototype.name):
736         (WebInspector.NativeHeapSnapshotNode.prototype.isHidden):
737         (WebInspector.NativeHeapSnapshotNode.prototype.isSynthetic):
738         (WebInspector.NativeHeapSnapshotNode.prototype.isWindow):
739         (WebInspector.NativeHeapSnapshotNode.prototype.isDetachedDOMTreesRoot):
740         (WebInspector.NativeHeapSnapshotNode.prototype.isDetachedDOMTree):
741         (WebInspector.NativeHeapSnapshotEdge):
742         (WebInspector.NativeHeapSnapshotEdge.prototype.clone):
743         (WebInspector.NativeHeapSnapshotEdge.prototype.hasStringName):
744         (WebInspector.NativeHeapSnapshotEdge.prototype.isElement):
745         (WebInspector.NativeHeapSnapshotEdge.prototype.isHidden):
746         (WebInspector.NativeHeapSnapshotEdge.prototype.isWeak):
747         (WebInspector.NativeHeapSnapshotEdge.prototype.isInternal):
748         (WebInspector.NativeHeapSnapshotEdge.prototype.isInvisible):
749         (WebInspector.NativeHeapSnapshotEdge.prototype.isShortcut):
750         (WebInspector.NativeHeapSnapshotEdge.prototype.name):
751         (WebInspector.NativeHeapSnapshotEdge.prototype.toString):
752         (WebInspector.NativeHeapSnapshotEdge.prototype._nameOrIndex):
753         (WebInspector.NativeHeapSnapshotRetainerEdge):
754         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.clone):
755         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isElement):
756         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isHidden):
757         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isInternal):
758         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isInvisible):
759         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isShortcut):
760         (WebInspector.NativeHeapSnapshotRetainerEdge.prototype.isWeak):
761         * inspector/front-end/NativeMemorySnapshotView.js:
762         (WebInspector.NativeSnapshotProfileType):
763         (WebInspector.NativeSnapshotProfileType.prototype.get buttonTooltip):
764         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
765         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
766         (WebInspector.NativeSnapshotProfileType.prototype.get treeItemTitle):
767         (WebInspector.NativeSnapshotProfileType.prototype.get description):
768         (WebInspector.NativeSnapshotProfileType.prototype.createTemporaryProfile):
769         (WebInspector.NativeSnapshotProfileType.prototype.createProfile):
770         (WebInspector.NativeSnapshotProfileHeader):
771         (WebInspector.NativeSnapshotProfileHeader.prototype.createView):
772         (WebInspector.NativeSnapshotProfileHeader.prototype.startSnapshotTransfer):
773         (WebInspector.NativeSnapshotProfileHeader.prototype.snapshotConstructorName):
774         (WebInspector.NativeSnapshotProfileHeader.prototype._takeNativeSnapshot): build a datastructure
775         resembling one used for JS heap snapshots but populated with the data from the native snaphot.
776         (WebInspector.NativeHeapSnapshotView):
777         (WebInspector.NativeHeapSnapshotView.prototype.get profile):
778         (WebInspector.NativeMemoryProfileType):
779         (WebInspector.NativeMemoryProfileType.prototype.get buttonTooltip):
780         * inspector/front-end/ProfilesPanel.js:
781         (WebInspector.ProfilesPanel):
782         * inspector/front-end/WebKit.qrc:
783
784 2013-01-21  Kentaro Hara  <haraken@chromium.org>
785
786         [V8] ScriptState::isolate() should use Context::GetIsolate()
787         https://bugs.webkit.org/show_bug.cgi?id=107490
788
789         Reviewed by Adam Barth.
790
791         Now V8 provides Context::GetIsolate(). We should use it
792         in ScriptState::isolate().
793
794         * bindings/v8/ScriptState.h:
795         (WebCore::ScriptState::isolate):
796         (ScriptState):
797
798 2013-01-21  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
799
800         [EFL] Missing context menus strings
801         https://bugs.webkit.org/show_bug.cgi?id=107104
802
803         Reviewed by Kenneth Rohde Christiansen.
804
805         Add 5 missing localization strings for text direction context menus.
806
807         * platform/efl/LocalizedStringsEfl.cpp:
808         (WebCore::contextMenuItemTagRightToLeft):
809         (WebCore::contextMenuItemTagLeftToRight):
810         (WebCore::contextMenuItemTagWritingDirectionMenu):
811         (WebCore::contextMenuItemTagTextDirectionMenu):
812         (WebCore::contextMenuItemTagDefaultDirection):
813
814 2013-01-21  Kent Tamura  <tkent@chromium.org>
815
816         Date selection from calendar picker should dispatch 'input' event in addition to 'change' event
817         https://bugs.webkit.org/show_bug.cgi?id=107427
818
819         Reviewed by Kentaro Hara.
820
821         According to the specification and Opera's behavior, we should dispatch
822         not only 'change' event but also 'input' event when a user chooses a
823         date from the calender picker.
824
825         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors
826         > When the user agent changes the element's value on behalf of the user
827         > (e.g. as part of a form prefilling feature), the user agent must follow
828         > these steps:
829         > 1. If the input event applies, queue a task to fire a simple event
830         > that bubbles named input at the input element.
831         > 2. If the change event applies, queue a task to fire a simple event
832         > that bubbles named change at the input element.
833
834         Tests: platform/chromium/fast/forms/calendar-picker/date-picker-events.html
835                platform/chromium/fast/forms/calendar-picker/datetimelocal-picker-events.html
836
837         * html/InputType.cpp:
838         (WebCore::InputType::setValue): Add DispatchInputAndChangeEvent support.
839         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
840         (WebCore::BaseChooserOnlyDateAndTimeInputType::didChooseValue):
841         Use DispatchInputAndChangeEvent, not DispatchChangeEvent.
842         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
843         (WebCore::BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue):
844         Ditto.
845
846 2013-01-21  Justin Schuh  <jschuh@chromium.org>
847
848         [CHROMIUM] Suppress c4267 build warnings for Win64 targets
849         https://bugs.webkit.org/show_bug.cgi?id=107499
850
851         Reviewed by Abhishek Arya.
852
853         No new tests. No code changes.
854
855         * WebCore.gyp/WebCore.gyp:
856
857 2013-01-21  Andreas Kling  <akling@apple.com>
858
859         CSSSelector::value() should assert that m_match != Tag.
860         <http://webkit.org/b/107500>
861
862         Reviewed by Anders Carlsson.
863
864         Add an assertion to catch anyone trying to extract a value() from a Tag selector.
865
866         * css/CSSSelector.h:
867         (CSSSelector):
868         (WebCore::CSSSelector::value):
869
870 2013-01-21  Dimitri Glazkov  <dglazkov@chromium.org>
871
872         Move HTML Attribute case-sensitivity logic out of SelectorChecker to HTMLDocument.
873         https://bugs.webkit.org/show_bug.cgi?id=107460
874
875         The case-sensitivity of HTML attributes is defined in HTML spec and is only applicable in HTML documents,
876         so having this logic in HTMLDocument seems like a good thing.
877
878         Reviewed by Eric Seidel.
879
880         Refactoring, covered by existing tests.
881
882         * css/SelectorChecker.cpp:
883         (WebCore): Moved code out of here.
884         (WebCore::isFastCheckableMatch): Changed the callsite to use new location.
885         (WebCore::SelectorChecker::checkOne): Ditto.
886         * html/HTMLDocument.cpp:
887         (WebCore::addLocalNameToSet): Moved the code into here.
888         (WebCore): Ditto.
889         (WebCore::createHtmlCaseInsensitiveAttributesSet): Ditto.
890         (WebCore::HTMLDocument::isCaseSensitiveAttribute): Ditto.
891         * html/HTMLDocument.h:
892         (HTMLDocument): Added decl for the newly moved function.
893
894 2013-01-21  Shinya Kawanaka  <shinyak@chromium.org>
895
896         FrameSelection should use shadowHost instead of shadowAncestorNode
897         https://bugs.webkit.org/show_bug.cgi?id=107220
898
899         Reviewed by Kent Tamura.
900
901         shadowAncestorNode() is deprecated and we want to use shadowHost.
902         Here, all objects calling shadowAncestorNode() is in ShadowDOM, we can safely convert
903         the call to shadowHost().
904
905         No new tests, simple refactoring.
906
907         * editing/FrameSelection.cpp:
908         (WebCore::FrameSelection::selectAll):
909
910 2013-01-21  Dirk Schulze  <dschulze@adobe.com>
911
912         Add build flag for Canvas's Path object (disabled by default)
913         https://bugs.webkit.org/show_bug.cgi?id=107473
914
915         Reviewed by Dean Jackson.
916
917         Add CANVAS_PATH build flag to build systems.
918
919         * Configurations/FeatureDefines.xcconfig:
920         * GNUmakefile.am:
921
922 2013-01-21  Andreas Kling  <akling@apple.com>
923
924         CSS: Make tag sub-selectors standalone CSSSelectors.
925         <http://webkit.org/b/107111>
926
927         Reviewed by Antti Koivisto.
928
929         TL;DR: Instead of storing a QualifiedName with every CSSSelector, special-case tag selectors
930                by promoting them to stand-alone CSSSelectors.
931                33% reduction in CSS selector memory usage, 4.77 MB progression on Membuster3.
932                Fixed some bugs in Shadow DOM that were exposed by these changes.
933
934         A selector like this:
935
936             div.tripp.trapp#trull { }
937
938         Would previously be represented by a chain of 3 CSSSelector objects like so:
939
940             [ Tag: "div",  Type: Class,  Value: "tripp" ]
941             [ Tag:     *,  Type: Class,  Value: "trapp" ]
942             [ Tag:     *,  Type: ID,     Value: "trull" ]
943
944         After this change, the memory layout becomes:
945
946             [ Type: Tag,    Value: "div"   ]
947             [ Type: Class,  Value: "tripp" ]
948             [ Type: Class,  Value: "trapp" ]
949             [ Type: ID,     Value: "trull" ]
950
951         This is a huge net memory win since the majority of selectors don't even have a tag name
952         and those that do now have a flat cost of one more CSSSelector.
953         Traversal is also slightly cleaner since any tag name will now be in a predictable place.
954
955         * css/SelectorChecker.cpp:
956         (WebCore::isFastCheckableMatch):
957         * html/shadow/HTMLContentElement.cpp:
958         (WebCore::validateSubSelector):
959
960             Renamed CSSSelector::None to CSSSelector::Tag.
961
962         * css/SelectorChecker.h:
963         (WebCore::SelectorChecker::tagMatches):
964         * css/StyleResolver.cpp:
965         (WebCore::StyleResolver::ruleMatches):
966
967             Changed SelectorChecker::tagMatches() to take a QualifiedName instead of a CSSSelector.
968
969         * dom/QualifiedName.cpp:
970         (WebCore::QualifiedName::deref):
971         (WebCore::QualifiedName::QualifiedNameImpl::~QualifiedNameImpl):
972         * dom/QualifiedName.h:
973         (QualifiedNameImpl):
974
975             Give QualifiedNameImpl a destructor so it can remove itself from the global cache instead of
976             having QualifiedName do it. This makes it possible to participate in ownership of QualifiedNames
977             via a QualifiedNameImpl pointer, as used by the union member in CSSSelector.
978
979         * css/CSSGrammar.y.in:
980         * css/CSSParser.cpp:
981         (WebCore::CSSParser::createFloatingSelectorWithTagName):
982         (WebCore::CSSParser::updateSpecifiersWithNamespaceIfNeeded):
983         (WebCore::CSSParser::updateSpecifiersWithElementName):
984         * css/CSSParser.h:
985         * css/CSSParserValues.h:
986         (CSSParserSelector):
987         * css/CSSParserValues.cpp:
988         (WebCore::CSSParserSelector::CSSParserSelector):
989         (WebCore::CSSParserSelector::prependTagSelector):
990
991             Make the CSS parser slap a CSSSelector with m_match=Tag at the head of all selectors that match
992             one or more of these criteria:
993
994             - The selector starts with a tag, e.g "div.foo" or just plain "span"
995             - There is a @namespace rule in effect, and the override namespace needs to be stored with the selector.
996               These will have CSSSelectors::m_isTagForNamespaceRule set, this is only so that selector serialization
997               can avoid outputting a '*' tag where we previously didn't.
998
999         (WebCore::CSSParserSelector::isSimple):
1000
1001             Merged the CSSSelector::isSimple() logic into CSSParserSelector, since it's only needed during parsing
1002             to figure out if a selector is allowed within :not().
1003
1004         * css/CSSSelector.h:
1005         (CSSSelector):
1006         (WebCore::CSSSelector::setValue):
1007         (WebCore::CSSSelector::CSSSelector):
1008         (WebCore::CSSSelector::~CSSSelector):
1009         (WebCore::CSSSelector::tagQName):
1010         * css/CSSSelector.cpp:
1011         (WebCore::CSSSelector::createRareData):
1012         (WebCore::CSSSelector::operator==):
1013
1014             Add a QualifiedNameImpl* m_tagQName member to the CSSSelector data union. This union pointer is used
1015             if m_match == Tag. tagQName() is used to retrieve the tag (renamed from tag().) 
1016
1017         (WebCore::CSSSelector::selectorText):
1018
1019             Only serialize Tag selector components that aren't namespace placeholders. This behavior is web-facing
1020             so we make an effort to stay consistent.
1021
1022         (WebCore::CSSSelector::specificityForOneSelector):
1023         (WebCore::CSSSelector::specificityForPage):
1024         * css/CSSSelectorList.cpp:
1025         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
1026         * css/RuleSet.cpp:
1027         (WebCore::isSelectorMatchingHTMLBasedOnRuleHash):
1028         * css/SelectorFilter.cpp:
1029         (WebCore::collectDescendantSelectorIdentifierHashes):
1030         (WebCore::SelectorFilter::collectIdentifierHashes):
1031
1032             Adapt algorithms to having Tag selectors.
1033
1034         (WebCore::selectorListContainsUncommonAttributeSelector):
1035
1036             Loop through all selector components when looking for uncommon attributes.
1037
1038         (WebCore::determinePropertyWhitelistType):
1039
1040             Loop through all selector components when looking for ::cue().
1041
1042         (WebCore::RuleSet::addRule):
1043         (WebCore::RuleSet::findBestRuleSetAndAdd):
1044
1045             Break addRule into two methods to be able to peek ahead if the first selector is a Tag.
1046             Otherwise we'd end up sticking most selectors in m_tagRules, breaking the class/ID/etc optimizations.
1047
1048         * css/SelectorChecker.cpp:
1049         (WebCore::SelectorChecker::fastCheck):
1050         (WebCore::SelectorChecker::fastCheckSingleSelector):
1051
1052             It's no longer necessary to check the tagQName for every selector component, so don't.
1053             Also simplified the signature of the template argument function.
1054
1055         (WebCore::SelectorChecker::fastCheckRightmostSelector):
1056
1057             Updated for Tag selectors.
1058
1059         (WebCore::SelectorChecker::checkOne):
1060         (WebCore::SelectorChecker::matches):
1061         (WebCore::SelectorChecker::match):
1062
1063             Have match() take a SiblingTraversalStrategy so it can forward that to checkOne().
1064             This is necessary for shadow DOM code that was incorrectly calling checkOne() instead of match().
1065
1066         * css/StyleResolver.cpp:
1067         (WebCore::StyleResolver::ruleMatches):
1068
1069             The meaning of "single-part selector" changes a bit with this patch, and no longer includes "div.foo"
1070             as that is now a Tag, followed by a Class. Given that, we can't assume the tag check is unnecessary
1071             just because the rightmost descendant was found in one of the hashes.
1072
1073         (WebCore::StyleResolver::matchPageRulesForList):
1074
1075             Loop through all selector components when matching @page since pseudo types may not always be in
1076             the first subselector now.
1077
1078         * html/shadow/ContentDistributor.cpp:
1079         (WebCore::ContentDistributor::collectSelectFeatureSetFrom):
1080
1081             Collect feature information from subselectors to make sure nothing is missed. (This bug was exposed
1082             by offsetting the subselectors.)
1083
1084         * html/shadow/ContentSelectorQuery.cpp:
1085         (WebCore::ContentSelectorChecker::checkContentSelector):
1086
1087             Call SelectorChecker::match() instead of checkOne() to make subselector traversal work properly.
1088
1089 2013-01-21  Levi Weintraub  <leviw@chromium.org>
1090
1091         Event target rects on the top level document shouldn't be clipped.
1092         https://bugs.webkit.org/show_bug.cgi?id=107339
1093
1094         Reviewed by James Robinson.
1095
1096         clippedOverflowRectForRepaint clips the top-level RenderView to the viewport, which
1097         is wrong for generating event target rects, as the result will not extend to the bounds
1098         of the document on pages that scroll. Changing the top-level view to use documentRect
1099         instead.
1100
1101         Tests updated to cover bug: platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html
1102                                     platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
1103
1104         * page/scrolling/ScrollingCoordinator.cpp:
1105         (WebCore::accumulateRendererTouchEventTargetRects): Use converToRootView instead of
1106         a loop around convertToContaining view. This is not a change in behavior.
1107         (WebCore::accumulateDocumentEventTargetRects): Switch to use documentRect instead of
1108         clippedOverflowRectForRepaint for the top-level Document, and use converToRootView
1109         to put rects in the coordinates of the top-level document.
1110
1111 2013-01-17  Andy Estes  <aestes@apple.com>
1112
1113         Add a USE() macro for content filtering code
1114         https://bugs.webkit.org/show_bug.cgi?id=107098
1115
1116         Reviewed by Mark Rowe.
1117
1118         * WebCore.exp.in: Use USE(CONTENT_FILTERING).
1119         * loader/MainResourceLoader.cpp:
1120         (WebCore::MainResourceLoader::MainResourceLoader): Ditto.
1121         (WebCore::MainResourceLoader::~MainResourceLoader): Ditto.
1122         (WebCore::MainResourceLoader::cancel): Ditto.
1123         (WebCore::MainResourceLoader::responseReceived): Ditto.
1124         (WebCore::MainResourceLoader::dataReceived): Ditto.
1125         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
1126         (WebCore::MainResourceLoader::notifyFinished): Ditto.
1127         * loader/MainResourceLoader.h:
1128         (MainResourceLoader): Ditto.
1129         * platform/mac/WebCoreSystemInterface.h: Ditto.
1130         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1131
1132 2013-01-21  Bem Jones-Bey  <bjonesbe@adobe.com>
1133
1134         [CSS Exclusions] shape-outside on floats for rectangle shapes positioning
1135         https://bugs.webkit.org/show_bug.cgi?id=100399
1136
1137         Reviewed by David Hyatt.
1138
1139         When a float has a shape-outside with non-zero x or y, the float's
1140         exclusion behavior can happen at a completely different location than
1141         where the float's content is painted. This patch brings initial
1142         support for this behavior.
1143
1144         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-positioning.html
1145
1146         * rendering/RenderBlock.cpp:
1147         (WebCore::RenderBlock::flipFloatForWritingModeForChild): If called
1148             during painting, make sure to pass that state down to the float
1149             positioning so that it can use the proper position.
1150         (WebCore::RenderBlock::paintFloats): Since this is concerned with
1151             painting, use the position of the float, not the shape.
1152         (WebCore::RenderBlock::positionNewFloats): Set the correct location
1153             for the float, relative to the location of the shape.
1154         (WebCore::RenderBlock::addOverhangingFloats): Add FIXME.
1155         * rendering/RenderBlock.h:
1156         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): 
1157         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Since the 
1158             position of the shape (FloatingObject) can be different from the
1159             position of the float's box (RenderBox), the position needs to be
1160             computed differently for painting than for determining layout.
1161         (WebCore::RenderBlock::flipFloatForWritingModeForChild): Change
1162             signature to take painting flag.
1163
1164 2013-01-21  Eric Carlson  <eric.carlson@apple.com>
1165
1166         Support non-WebVTT cues from in-band text tracks
1167         https://bugs.webkit.org/show_bug.cgi?id=107046
1168
1169         Reviewed by Sam Weinig.
1170
1171         * CMakeLists.txt: Add new files.
1172         * GNUmakefile.list.am: Ditto.
1173         * Target.pri: Ditto.
1174         * WebCore.gypi: Ditto.
1175         * WebCore.vcproj/WebCore.vcproj: Ditto.
1176         * WebCore.xcodeproj/project.pbxproj: Ditto.
1177
1178         * html/shadow/MediaControlElements.cpp:
1179         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Pass video size to getDisplayTree.
1180
1181         * html/track/InbandTextTrack.cpp:
1182         (WebCore::InbandTextTrack::addGenericCue): New, create a generic cue if it doesn't already exist.
1183         (WebCore::InbandTextTrack::addWebVTTCue): Renamed from addCue.
1184         * html/track/InbandTextTrack.h:
1185
1186         * html/track/TextTrack.cpp:
1187         (WebCore::TextTrack::hasCue): Moved from InbandTextTrack.cpp, use operator == instead of inline
1188             comparison so derived TextTrackCues can be compared.
1189         * html/track/TextTrack.h:
1190
1191         * html/track/TextTrackCue.cpp:
1192         (WebCore::TextTrackCueBox::applyCSSProperties): Interface change.
1193         (WebCore::TextTrackCue::TextTrackCue): Don't create the display tree in the constructor, it may
1194             never be needed.
1195         (WebCore::TextTrackCue::createDisplayTree): New, create the display tree.
1196         (WebCore::TextTrackCue::displayTreeInternal): Display tree accessor, allows it to be created lazily.
1197         (WebCore::TextTrackCue::setAlign): Alignment -> CueAlignment.
1198         (WebCore::TextTrackCue::setIsActive): Use displayTreeInternal().
1199         (WebCore::TextTrackCue::getDisplayTree): Use displayTreeInternal(), pass video size to applyCSSProperties.
1200         (WebCore::TextTrackCue::removeDisplayTree): Use displayTreeInternal().
1201         (WebCore::TextTrackCue::operator==): New.
1202         * html/track/TextTrackCue.h:
1203         (WebCore::TextTrackCue::getAlignment): Alignment -> CueAlignment.
1204         (WebCore::TextTrackCue::operator!=): New.
1205         (WebCore::TextTrackCue::cueType): New, cue type identified needed by operator==.
1206         (WebCore::TextTrackCue::ownerDocument): New.
1207
1208         * html/track/TextTrackCueGeneric.cpp: Added.
1209         (WebCore::TextTrackCueGenericBox::create):
1210         (WebCore::TextTrackCueGenericBox::TextTrackCueGenericBox):
1211         (WebCore::TextTrackCueGenericBox::applyCSSProperties):
1212         (WebCore:::TextTrackCue):
1213         (WebCore::TextTrackCueGeneric::createDisplayTree):
1214         (WebCore::TextTrackCueGeneric::operator==):
1215         * html/track/TextTrackCueGeneric.h: Added.
1216         (WebCore::TextTrackCueGeneric::create):
1217         (WebCore::TextTrackCueGeneric::~TextTrackCueGeneric):
1218         (WebCore::TextTrackCueGeneric::baseFontSizeRelativeToVideoHeight):
1219         (WebCore::TextTrackCueGeneric::setBaseFontSizeRelativeToVideoHeight):
1220         (WebCore::TextTrackCueGeneric::fontSizeMultiplier):
1221         (WebCore::TextTrackCueGeneric::setFontSizeMultiplier):
1222         (WebCore::TextTrackCueGeneric::fontName):
1223         (WebCore::TextTrackCueGeneric::setFontName):
1224         (WebCore::TextTrackCueGeneric::operator!=):
1225         (WebCore::TextTrackCueGeneric::cueType):
1226
1227         * platform/graphics/InbandTextTrackPrivateClient.h:
1228         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1229         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Copy cue attributes into GenericCueData
1230             struct instead of trying to convert to WebVTT settings string. Process font size,font base
1231             size, font name, and vertical layout attributes,
1232         (WebCore::InbandTextTrackPrivateAVF::processCue): Create separate cues for each attributed
1233             string in the array because each one can be at a different screen location.
1234         (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
1235         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1236         (InbandTextTrackPrivateAVF):
1237
1238         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1239         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Reset any partially accumulated cues
1240             delivered since the seek was started.
1241         (WebCore::MediaPlayerPrivateAVFoundation::addGenericCue): Renamed from flushCurrentCue.
1242         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1243
1244         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1245         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Whitespace cleanup.
1246         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
1247         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Tell legible output to deliver cues
1248             without any additional styling needed by the internal renderer.
1249         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks):
1250         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Do nothing if asked to change
1251             to the track that is already current.
1252         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
1253             Check to make sure that the client callback isn't NULL.
1254
1255 2013-01-21  Robert Hogan  <robert@webkit.org>
1256
1257         Misaligned logo on www.nzherald.co.nz possibly due to negative margin-top
1258         https://bugs.webkit.org/show_bug.cgi?id=14664
1259
1260         Reviewed by David Hyatt.
1261
1262         Test: fast/block/float/clear-negative-margin-top.html
1263
1264         * rendering/RenderBlock.cpp:
1265         (WebCore::RenderBlock::collapseMargins): If a negative margin pulls a block up so that floats from
1266         siblings overhang, then ensure addOverHangingFloats() uses the revised logical top position when
1267         deciding whether a float does indeed overhang into the block after margin-collapsing.
1268         (WebCore::RenderBlock::clearFloatsIfNeeded):
1269
1270 2013-01-21  Rik Cabanier  <cabanier@adobe.com>
1271
1272         Proposal: Add support for even-odd fill and clip to Canvas
1273         https://bugs.webkit.org/show_bug.cgi?id=106188
1274
1275         Reviewed by Dirk Schulze.
1276
1277         This patch adds support for an optional winding rule to fill, clip
1278         and isPointInPath in canvas 2d. By default, the fill is non-zero but
1279         you can now pass in an optional winding rule string ("nonzero" or "evenodd")
1280         to make an explicit choice.
1281
1282         Tests: fast/canvas/canvas-clip-rule.html
1283                fast/canvas/canvas-fill-rule.html
1284                fast/canvas/canvas-isPointInPath-winding.html
1285
1286         * html/canvas/CanvasRenderingContext2D.cpp: Change implementation so it sets the windig rule in the context.
1287         (WebCore::parseWinding):
1288         (WebCore):
1289         (WebCore::CanvasRenderingContext2D::fill):
1290         (WebCore::CanvasRenderingContext2D::clip):
1291         (WebCore::CanvasRenderingContext2D::isPointInPath):
1292         * html/canvas/CanvasRenderingContext2D.h: 
1293         (CanvasRenderingContext2D):
1294         * html/canvas/CanvasRenderingContext2D.idl: Change the idl so the new API is exposed to JavaScript.
1295         * platform/graphics/cg/GraphicsContextCG.cpp: Fixes a bug where the wrong winding rule was set for clipping in Core Graphics.
1296         (WebCore::GraphicsContext::clip):
1297
1298 2013-01-21  ChangSeok Oh  <shivamidow@gmail.com>
1299
1300         [GTK][AC] setOpacity doesn't work for GraphicsLayerClutter
1301         https://bugs.webkit.org/show_bug.cgi?id=105436
1302
1303         Reviewed by Gustavo Noronha Silva.
1304
1305         Implement GraphicsLayerClutter::setOpacity based on Mac's GraphicsLayer implementation.
1306
1307         No new tests since this patch can be covered by already existing gtk ac tests.
1308
1309         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1310         (WebCore::GraphicsLayerClutter::setOpacity):
1311         (WebCore):
1312         (WebCore::GraphicsLayerClutter::updateOpacityOnLayer):
1313         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
1314         * platform/graphics/clutter/GraphicsLayerClutter.h:
1315
1316 2013-01-21  ChangSeok Oh  <shivamidow@gmail.com>
1317
1318         [Texmap][GTK] The poster-circle doesn't appear.
1319         https://bugs.webkit.org/show_bug.cgi?id=106672
1320
1321         Reviewed by Noam Rosenthal.
1322
1323         We need to call setNeedsDisplay to redraw GraphicsLayer after we set drawsContent
1324         a new value for the layer. Otherwise we can't get a chance for first drawing the layer.
1325
1326         Test: compositing/visibility/visibility-composited-animation.html
1327
1328         * platform/graphics/texmap/TextureMapperLayer.cpp:
1329         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
1330
1331 2013-01-21  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
1332
1333         [EFL][Qt][WebGl] Random crash in GraphicsContext3D::drawArrays
1334         https://bugs.webkit.org/show_bug.cgi?id=107178
1335
1336         Reviewed by Noam Rosenthal.
1337
1338         Workaround for the problem in mesa when internal llvm pipe object is deleted
1339         later than the screen object. Screen object is deleted because the corresponding 
1340         X server display connection closed.
1341         Keep X server display connection open until program shutdown. 
1342         OffScreenRootWindow::display is now static, so there is no need to create
1343         OffScreenRootWindow object on client side.
1344
1345         Fixes crash that appears during run of fast/canavs/webgl tests.
1346
1347         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1348         (OffScreenRootWindow):
1349         (WebCore::OffScreenRootWindow::DisplayConnection::DisplayConnection):
1350         (DisplayConnection):
1351         (WebCore::OffScreenRootWindow::DisplayConnection::~DisplayConnection):
1352         (WebCore::OffScreenRootWindow::DisplayConnection::display):
1353         (WebCore::OffScreenRootWindow::display):
1354         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1355         (WebCore):
1356         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1357         (WebCore::GraphicsSurfacePrivate::createSurface):
1358         (WebCore::GraphicsSurfacePrivate::createPixmap):
1359         (WebCore::GraphicsSurfacePrivate::makeCurrent):
1360         (WebCore::GraphicsSurfacePrivate::doneCurrent):
1361         (WebCore::GraphicsSurfacePrivate::swapBuffers):
1362         (WebCore::GraphicsSurfacePrivate::display):
1363         (WebCore::GraphicsSurfacePrivate::size):
1364         (WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha):
1365         (WebCore::GraphicsSurfacePrivate::clear):
1366         (GraphicsSurfacePrivate):
1367
1368 2013-01-21  Michael[tm] Smith  <mike@w3.org>
1369
1370         Implement the HTML <main> element.
1371         https://bugs.webkit.org/show_bug.cgi?id=103172
1372
1373         Reviewed by Chris Fleizach.
1374
1375         Authored by Steve Faulkner <faulkner.steve@gmail.com>
1376
1377         <main> should behave the same as <nav>, <section>, and <article>, and <aside>.
1378         <main> should expose AXLandmarkMain correctly on each platform.
1379
1380         Tests: fast/html/main-element.html
1381                platform/chromium/accessibility/main-element.html
1382                platform/mac/accessibility/main-element.html
1383
1384         * accessibility/AccessibilityRenderObject.cpp:
1385         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1386         * css/html.css:
1387         (article, aside, footer, header, hgroup, main, nav, section):
1388         * editing/FormatBlockCommand.cpp:
1389         (WebCore::isElementForFormatBlock):
1390         * html/HTMLTagNames.in:
1391         * html/parser/HTMLStackItem.h:
1392         (WebCore::HTMLStackItem::isSpecialNode):
1393         * html/parser/HTMLTreeBuilder.cpp:
1394         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1395         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1396
1397 2013-01-21  Joanmarie Diggs  <jdiggs@igalia.com>
1398
1399         Crash in AccessibilityTableCell::parentTable()
1400         https://bugs.webkit.org/show_bug.cgi?id=107261
1401
1402         Reviewed by Chris Fleizach.
1403
1404         Test: accessibility/table-destroyed-crash.html
1405
1406         Getting the parent table in order to get the role value should not be
1407         done when objects are being destroyed. Also, it does not seem safe to
1408         assume we have an AXObjectCache.
1409
1410         Moving the logic from roleValue() to determineAccessibilityRole() has
1411         the side effect of not being able to verify the cell is in an AXTable
1412         when that AXTable has not yet been created. Therefore isTableCell()
1413         should look to see if it is the descendant of an AXRow.
1414
1415         * accessibility/AccessibilityTableCell.cpp:
1416         (WebCore::AccessibilityTableCell::parentTable):
1417         (WebCore::AccessibilityTableCell::isTableCell):
1418         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
1419         * accessibility/AccessibilityTableCell.h:
1420         (AccessibilityTableCell):
1421
1422 2013-01-21  Halton Huo  <halton.huo@intel.com>
1423
1424         [GTK] Volume button should not be shown for videos without audio
1425         https://bugs.webkit.org/show_bug.cgi?id=106436
1426
1427         Reviewed by Philippe Normand.
1428
1429         The volume control is no longer shown for videos with no audio.
1430
1431         No new tests, tested by media/video-no-audio.html.
1432
1433         * platform/gtk/RenderThemeGtk.cpp:
1434         (WebCore::RenderThemeGtk::hasOwnDisabledStateHandlingFor):
1435         (WebCore):
1436         * platform/gtk/RenderThemeGtk.h:
1437
1438 2013-01-21  Dan Winship  <danw@gnome.org>
1439
1440         [Soup] Work around a glib bug
1441         https://bugs.webkit.org/show_bug.cgi?id=106789
1442
1443         Reviewed by Martin Robinson.
1444
1445         In glib <= 2.35.4, g_input_stream_skip_async() applied to a
1446         libsoup response stream will do a synchronous skip() in another
1447         thread, which libsoup isn't expecting and doesn't have proper
1448         locking for. Work around this until the next time we bump the glib
1449         requirement by using read_async() (and throwing away the result)
1450         instead of skip_async().
1451
1452         No new tests; fixes a race condition in existing tests with older
1453         glib
1454
1455         * platform/network/soup/ResourceHandleSoup.cpp:
1456         (WebCore::redirectSkipCallback):
1457         (WebCore::sendRequestCallback):
1458
1459 2013-01-18  Andrey Kosyakov  <caseq@chromium.org>
1460
1461         Web Inspector: data grid resize is slow
1462         https://bugs.webkit.org/show_bug.cgi?id=107291
1463
1464         Reviewed by Pavel Feldman.
1465
1466         - avoid (most of) unnecessary relayouts and style recalculation when dragging data grid resizer.
1467
1468         * inspector/front-end/DataGrid.js:
1469         (WebInspector.DataGrid.prototype._positionResizers):
1470         (WebInspector.DataGrid.prototype._resizerDragging):
1471
1472 2013-01-21  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1473
1474         [Inspector] Layout Elements panel in a single column when docked right.
1475         https://bugs.webkit.org/show_bug.cgi?id=107129
1476
1477         Reviewed by Pavel Feldman.
1478
1479         If the Inspector is docked right, the style panes in the Elements panel
1480         are put below the DOM tree pane, not to the right. This behavior
1481         is experimental (hidden behind a new flag "elementsPanelSingleColumn").
1482
1483         No new tests.
1484
1485         * inspector/front-end/DockController.js:
1486         (WebInspector.DockController.prototype.dockSide):
1487         (WebInspector.DockController.prototype._updateUI):
1488         (WebInspector.DockController.prototype._toggleDockState):
1489         * inspector/front-end/ElementsPanel.js:
1490         (WebInspector.ElementsPanel.prototype.onResize):
1491         (WebInspector.ElementsPanel.prototype._onDockStateChanged):
1492         (WebInspector.ElementsPanel.prototype._sidebarPosition):
1493         * inspector/front-end/Panel.js:
1494         (WebInspector.Panel.prototype.createSidebarView):
1495         * inspector/front-end/Settings.js:
1496         (WebInspector.ExperimentsSettings):
1497         * inspector/front-end/SidebarView.js:
1498         (WebInspector.SidebarView):
1499         (WebInspector.SidebarView.prototype.get mainElement):
1500         (WebInspector.SidebarView.prototype.get sidebarElement):
1501         (WebInspector.SidebarView.prototype._setSidebarElementStyle):
1502         (WebInspector.SidebarView.prototype.setSidebarPosition):
1503         (WebInspector.SidebarView.prototype._innerSetSidebarPosition):
1504         (WebInspector.SidebarView.prototype.setMinimumSidebarHeight):
1505         (WebInspector.SidebarView.prototype.setMinimumMainHeightPercent):
1506         (WebInspector.SidebarView.prototype.applyConstraints):
1507         (WebInspector.SidebarView.prototype.hideMainElement):
1508         (WebInspector.SidebarView.prototype.hideSidebarElement):
1509         * inspector/front-end/SplitView.js:
1510         (WebInspector.SplitView):
1511         * inspector/front-end/splitView.css:
1512         (.split-view-sidebar-top):
1513         (.split-view-sidebar-top.maximized):
1514         (.split-view-sidebar-bottom):
1515         (.split-view-sidebar-bottom.maximized):
1516
1517 2013-01-21  Yury Semikhatsky  <yurys@chromium.org>
1518
1519         Web Inspector: do not serialize native heap graph when collecting information about memory distribution
1520         https://bugs.webkit.org/show_bug.cgi?id=107450
1521
1522         Reviewed by Pavel Feldman.
1523
1524         Native heap graph is not reported when we need to show only high-level memory distribution.
1525
1526         * inspector/front-end/NativeMemorySnapshotView.js:
1527         (WebInspector.NativeMemorySnapshotView):
1528         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
1529         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
1530
1531 2013-01-21  Alexander Pavlov  <apavlov@chromium.org>
1532
1533         Web Inspector: [REGRESSION] Forced :visited pseudoclass has no effect on A elements
1534         https://bugs.webkit.org/show_bug.cgi?id=107448
1535
1536         Reviewed by Antti Koivisto.
1537
1538         * css/StyleResolver.cpp:
1539         (WebCore::StyleResolver::sortAndTransferMatchedRules): Remove totally bad code.
1540         (WebCore::StyleResolver::styleForElement):
1541           Use InsideVisitedLink if PseudoVisited has been forced by Inspector.
1542
1543 2013-01-18  Andrey Adaikin  <aandrey@chromium.org>
1544
1545         Web Inspector: modify generate_protocol_externs.py to generate JSON typedef's for @constructors
1546         https://bugs.webkit.org/show_bug.cgi?id=107287
1547
1548         Reviewed by Pavel Feldman.
1549
1550         Modify generate_protocol_externs.py to generate @typedefs instead of @constructors,
1551
1552         * inspector/InjectedScriptCanvasModuleSource.js:
1553         (.):
1554         * inspector/InjectedScriptSource.js:
1555         * inspector/compile-front-end.py:
1556         * inspector/generate_protocol_externs.py:
1557         (param_type):
1558
1559 2013-01-21  Oleg Smirnov  <oleg.smirnov@lge.com>
1560
1561         [Gtk] [Cairo] Memory leak when is WebView destroy.
1562         https://bugs.webkit.org/show_bug.cgi?id=107112
1563
1564         Reviewed by Martin Robinson.
1565
1566         Make createSurfaceForBackingStore return a smart pointer in all supported
1567         build configurations to avoid a memory leak.
1568         
1569         No new tests. There is memory leak only.
1570
1571         * platform/cairo/WidgetBackingStoreCairo.cpp:
1572         (WebCore::createSurfaceForBackingStore):
1573
1574 2013-01-21  Kent Tamura  <tkent@chromium.org>
1575
1576         INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element value is not updated
1577         https://bugs.webkit.org/show_bug.cgi?id=107429
1578
1579         Reviewed by Kentaro Hara.
1580
1581         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#common-event-behaviors
1582         > any time the user causes the element's value to change, the user agent
1583         > must queue a task to fire a simple event that bubbles named input at the
1584         > input element.
1585
1586         Tests:
1587         fast/forms/time-multiple-fields/time-multiple-fields-keyboard-event.html
1588         is updated to cover this change.
1589
1590         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1591         (WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged):
1592         If the new value is equivalent to the old value, don't dispatch events.
1593         However we should recalculate validity and call notifyFormStateChanged
1594         because input.validity.badInput state might be changed.
1595
1596 2013-01-21  Alexander Pavlov  <apavlov@chromium.org>
1597
1598         Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
1599         https://bugs.webkit.org/show_bug.cgi?id=107419
1600
1601         Reviewed by Pavel Feldman.
1602
1603         mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
1604
1605         * page/EventHandler.cpp:
1606         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
1607
1608 2013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
1609
1610         Web Inspector: fix highlight bug in DTE.
1611         https://bugs.webkit.org/show_bug.cgi?id=107433
1612
1613         Reviewed by Pavel Feldman.
1614
1615         Do not re-create |state.ranges| array when it already contains highlight.
1616
1617         Test: inpector/editor/highlighter-chunk-limit.txt
1618
1619         * inspector/front-end/TextEditorHighlighter.js:
1620         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
1621
1622 2013-01-21  Takashi Sakamoto  <tasak@google.com>
1623
1624         [Refactoring] rename StyleRuleBlock -> StyleRuleGroup
1625         https://bugs.webkit.org/show_bug.cgi?id=107415
1626
1627         Reviewed by Antti Koivisto.
1628
1629         StyleRuleBlock should be renamed StyleRuleGroup, because
1630         CSSGroupingRule (not CSSBlockRule) is an interface for an at-rule that
1631         contains other rules nested inside itself:
1632         http://www.w3.org/TR/2012/WD-css3-conditional-20121213/#the-cssgroupingrule-interface
1633         To match the name: CSSGroupingRule, StyleRuleGroup looks better.
1634
1635         No new tests, because just refactoring.
1636
1637         * css/CSSGroupingRule.cpp:
1638         (WebCore::CSSGroupingRule::CSSGroupingRule):
1639         (WebCore::CSSGroupingRule::reattach):
1640         * css/CSSGroupingRule.h:
1641         (CSSGroupingRule):
1642         * css/StyleRule.cpp:
1643         (WebCore::StyleRuleGroup::StyleRuleGroup):
1644         (WebCore::StyleRuleGroup::wrapperInsertRule):
1645         (WebCore::StyleRuleGroup::wrapperRemoveRule):
1646         (WebCore::StyleRuleGroup::reportDescendantMemoryUsage):
1647         (WebCore::StyleRuleMedia::StyleRuleMedia):
1648         (WebCore::StyleRuleSupports::StyleRuleSupports):
1649         (WebCore::StyleRuleRegion::StyleRuleRegion):
1650         * css/StyleRule.h:
1651         (StyleRuleGroup):
1652         (WebCore::StyleRuleHost::StyleRuleHost):
1653         (WebCore::toStyleRuleMedia):
1654         (WebCore::toStyleRuleSupports):
1655         (WebCore::toStyleRuleRegion):
1656         Just replaced StyleRuleBlock with StyleRuleGroup.
1657
1658 2013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
1659
1660         Web Inspector: refactoring to use string as argument for highlightRegex API
1661         https://bugs.webkit.org/show_bug.cgi?id=107243
1662
1663         Reviewed by Pavel Feldman.
1664
1665         Use string as argument for highlightRegex API instead of using regex object.
1666
1667         No new tests: no change in behaviour.
1668
1669         * inspector/front-end/DefaultTextEditor.js:
1670         (WebInspector.TextEditorMainPanel.prototype.highlightRegex):
1671         * inspector/front-end/TextEditor.js:
1672
1673 2013-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1674
1675         Unreviewed, rolling out r140311.
1676         http://trac.webkit.org/changeset/140311
1677         https://bugs.webkit.org/show_bug.cgi?id=107431
1678
1679         Broke selection-related tests (Requested by apavlov on
1680         #webkit).
1681
1682         * page/EventHandler.cpp:
1683         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
1684
1685 2013-01-21  Kentaro Hara  <haraken@chromium.org>
1686
1687         Unreviewed. Build fix.
1688
1689         * bindings/v8/V8NPObject.cpp:
1690         (WebCore::createV8ObjectForNPObject):
1691
1692 2013-01-20  Alexander Pavlov  <apavlov@chromium.org>
1693
1694         Web Inspector: Do not dispatch mousemove when emulating touch event and no touch is active
1695         https://bugs.webkit.org/show_bug.cgi?id=107419
1696
1697         Reviewed by Pavel Feldman.
1698
1699         mousemove event should not be dispatched when emulating touch events and mouse button is not pressed
1700
1701         * page/EventHandler.cpp:
1702         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
1703
1704 2013-01-21  Tommy Widenflycht  <tommyw@google.com>
1705
1706         MediaStream API: Update the RTCPeerConnection states to match the latest specification
1707         https://bugs.webkit.org/show_bug.cgi?id=107120
1708
1709         Reviewed by Adam Barth.
1710
1711         http://dev.w3.org/2011/webrtc/editor/webrtc.html#interface-definition
1712
1713         RTCPeerConnection::readyState and iceState are history and instead signalingState,
1714         iceConnectionState and iceGatheringState have been introduced.
1715
1716         Existing tests updated to cover this patch.
1717
1718         * Modules/mediastream/RTCPeerConnection.cpp:
1719         (WebCore::RTCPeerConnection::RTCPeerConnection):
1720         (WebCore::RTCPeerConnection::createOffer):
1721         (WebCore::RTCPeerConnection::createAnswer):
1722         (WebCore::RTCPeerConnection::setLocalDescription):
1723         (WebCore::RTCPeerConnection::localDescription):
1724         (WebCore::RTCPeerConnection::setRemoteDescription):
1725         (WebCore::RTCPeerConnection::remoteDescription):
1726         (WebCore::RTCPeerConnection::updateIce):
1727         (WebCore::RTCPeerConnection::addIceCandidate):
1728         (WebCore::RTCPeerConnection::readyState):
1729         (WebCore):
1730         (WebCore::RTCPeerConnection::signalingState):
1731         (WebCore::RTCPeerConnection::iceConnectionState):
1732         (WebCore::RTCPeerConnection::addStream):
1733         (WebCore::RTCPeerConnection::removeStream):
1734         (WebCore::RTCPeerConnection::createDataChannel):
1735         (WebCore::RTCPeerConnection::close):
1736         (WebCore::RTCPeerConnection::didChangeSignalingState):
1737         (WebCore::RTCPeerConnection::didChangeIceGatheringState):
1738         (WebCore::RTCPeerConnection::didChangeIceConnectionState):
1739         (WebCore::RTCPeerConnection::didAddRemoteStream):
1740         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
1741         (WebCore::RTCPeerConnection::didAddRemoteDataChannel):
1742         (WebCore::RTCPeerConnection::stop):
1743         (WebCore::RTCPeerConnection::changeSignalingState):
1744         (WebCore::RTCPeerConnection::changeIceGatheringState):
1745         (WebCore::RTCPeerConnection::changeIceConnectionState):
1746         * Modules/mediastream/RTCPeerConnection.h:
1747         (RTCPeerConnection):
1748         * Modules/mediastream/RTCPeerConnection.idl:
1749         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
1750         (RTCPeerConnectionHandlerClient):
1751         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
1752         (WebCore::RTCPeerConnectionHandlerChromium::didChangeSignalingState):
1753         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEConnectionState):
1754         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
1755         (RTCPeerConnectionHandlerChromium):
1756
1757 2013-01-21  Kent Tamura  <tkent@chromium.org>
1758
1759         Use ISO8601 date/time formats as fallbacks for date/time input types
1760         https://bugs.webkit.org/show_bug.cgi?id=107418
1761
1762         Reviewed by Kentaro Hara.
1763
1764         We obtain date/time formats from OSes to build date/time input type
1765         UIs. If something wrong happens in the code, fallback formats are
1766         used. Such fallback formats should not be English formats in order that
1767         we can find defects easily.
1768
1769         No new tests. These formats should not be used unless the current code
1770         has defects.
1771
1772         * html/DateTimeInputType.cpp:
1773         (WebCore::DateTimeInputType::setupLayoutParameters):
1774         Use an ISO8601 format which is same as a format used in HTML5.
1775         * html/DateTimeLocalInputType.cpp:
1776         (WebCore::DateTimeLocalInputType::setupLayoutParameters): Ditto.
1777         * html/MonthInputType.cpp:
1778         (WebCore::MonthInputType::setupLayoutParameters): Ditto.
1779         * html/WeekInputType.cpp:
1780         (WebCore::WeekInputType::setupLayoutParameters): Ditto.
1781         * platform/text/LocaleICU.cpp:
1782         (WebCore::LocaleICU::dateFormat): Ditto.
1783         * platform/text/LocaleNone.cpp:
1784         (WebCore::LocaleNone::dateFormat): Ditto.
1785         (WebCore::LocaleNone::dateTimeFormatWithSeconds): Ditto.
1786         (WebCore::LocaleNone::dateTimeFormatWithoutSeconds): Ditto.
1787
1788 2013-01-20  Matt Falkenhagen  <falken@chromium.org>
1789
1790         Elements must be reattached when inserted/removed from top layer
1791         https://bugs.webkit.org/show_bug.cgi?id=105489
1792
1793         Relanding r139402 as rollout due to suspected perf regression did not help (bug 106726).
1794
1795         Reviewed by Julien Chaffraix.
1796
1797         Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly:
1798         as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise.
1799
1800         We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it
1801         only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close()
1802         followed immediately by show() results in no style change.
1803
1804         Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html
1805                fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html
1806
1807         * dom/Element.cpp:
1808         (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector.
1809         removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed.
1810         (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached.
1811
1812 2013-01-20  Yury Semikhatsky  <yurys@chromium.org>
1813
1814         Web Inspector: change HeapSnapshotLoader to allow loading native heap snapshots
1815         https://bugs.webkit.org/show_bug.cgi?id=107282
1816
1817         Reviewed by Pavel Feldman.
1818
1819         Conctete heap snapshot constructor name is passed as a parameter to HeapSnapshotLoaderProxy and
1820         propagated to HeapSnapshotLoader.buildSnapshot to support different types of heap snapshots.
1821
1822         * inspector/front-end/HeapSnapshotLoader.js:
1823         (WebInspector.HeapSnapshotLoader.prototype.buildSnapshot):
1824         * inspector/front-end/HeapSnapshotProxy.js:
1825         (WebInspector.HeapSnapshotWorker.prototype.createLoader):
1826         (WebInspector.HeapSnapshotLoaderProxy):
1827         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
1828         * inspector/front-end/HeapSnapshotView.js:
1829         (WebInspector.HeapProfileHeader.prototype._setupWorker):
1830
1831 2013-01-20  Kentaro Hara  <haraken@chromium.org>
1832
1833         Implement MediaStreamEvent constructor
1834         https://bugs.webkit.org/show_bug.cgi?id=107411
1835
1836         Reviewed by Adam Barth.
1837
1838         Spec: http://www.w3.org/TR/webrtc/#mediastreamevent
1839
1840         Test: fast/events/constructors/media-stream-event-constructor.html
1841
1842         * Modules/mediastream/MediaStreamEvent.cpp:
1843         (WebCore::MediaStreamEventInit::MediaStreamEventInit):
1844         (WebCore):
1845         (WebCore::MediaStreamEvent::create):
1846         (WebCore::MediaStreamEvent::MediaStreamEvent):
1847         * Modules/mediastream/MediaStreamEvent.h:
1848         (MediaStreamEventInit):
1849         (WebCore):
1850         (MediaStreamEvent):
1851         * Modules/mediastream/MediaStreamEvent.idl:
1852         * bindings/js/JSDictionary.cpp:
1853         (WebCore):
1854         (WebCore::JSDictionary::convertValue):
1855         * bindings/js/JSDictionary.h:
1856         (WebCore):
1857         * bindings/v8/Dictionary.cpp:
1858         (WebCore):
1859         (WebCore::Dictionary::get):
1860         * bindings/v8/Dictionary.h:
1861         (Dictionary):
1862
1863 2013-01-20  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1864
1865         Web Inspector: Allow SplitView to change orientation after the construction.
1866         https://bugs.webkit.org/show_bug.cgi?id=107263
1867
1868         Added SplitView.prototype.setIsVertical to change the orientation on the fly.
1869         Instead of passing default sidebar size to the constructor the client
1870         may now pass separate defaults for the sidebar width and height. Passing
1871         just one default works as before.
1872
1873         Reviewed by Pavel Feldman.
1874
1875         No new tests.
1876
1877         * inspector/front-end/SplitView.js:
1878         (WebInspector.SplitView):
1879         (WebInspector.SplitView.prototype.isVertical):
1880         (WebInspector.SplitView.prototype.setIsVertical):
1881         (WebInspector.SplitView.prototype._innerSetIsVertical):
1882         (WebInspector.SplitView.prototype._updateLayout):
1883         (WebInspector.SplitView.prototype.isSidebarSecond):
1884         (WebInspector.SplitView.prototype.showBoth):
1885         (WebInspector.SplitView.prototype._updateTotalSize):
1886         (WebInspector.SplitView.prototype._innerSetSidebarSize):
1887         (WebInspector.SplitView.prototype.wasShown):
1888         (WebInspector.SplitView.prototype.onResize):
1889         (WebInspector.SplitView.prototype.installResizer):
1890         (WebInspector.SplitView.prototype._onDragStart):
1891         (WebInspector.SplitView.prototype._sizeSetting):
1892         (WebInspector.SplitView.prototype._lastSidebarSize):
1893         (WebInspector.SplitView.prototype.get _saveSidebarSize):
1894
1895 2013-01-20  Kentaro Hara  <haraken@chromium.org>
1896
1897         Add a [ConstructorConditional] IDL attribute
1898         https://bugs.webkit.org/show_bug.cgi?id=107407
1899
1900         Reviewed by Adam Barth.
1901
1902         Per discussion in webkit-dev, we need to implement DOM4 event constructors
1903         under a enable flag. For that purpose, we implement a [ConstructorConditional]
1904         IDL attribute.
1905
1906         Test: bindings/scripts/test/TestInterface.idl
1907
1908         * bindings/scripts/CodeGenerator.pm:
1909         (GenerateConstructorConditionalString):
1910         * bindings/scripts/CodeGeneratorJS.pm:
1911         (GenerateConstructorDeclaration):
1912         (GenerateConstructorHelperMethods):
1913         * bindings/scripts/CodeGeneratorV8.pm:
1914         (GenerateHeader):
1915         (GenerateImplementation):
1916         * bindings/scripts/IDLAttributes.txt:
1917         * bindings/scripts/test/JS/JSTestInterface.cpp:
1918         (WebCore):
1919         * bindings/scripts/test/JS/JSTestInterface.h:
1920         (JSTestInterfaceConstructor):
1921         * bindings/scripts/test/TestInterface.idl:
1922         * bindings/scripts/test/V8/V8TestInterface.cpp:
1923         (WebCore::ConfigureV8TestInterfaceTemplate):
1924         * bindings/scripts/test/V8/V8TestInterface.h:
1925         (V8TestInterface):
1926
1927 2013-01-20  Kentaro Hara  <haraken@chromium.org>
1928
1929         [V8] We should set a class id for a NPObject wrapper
1930         https://bugs.webkit.org/show_bug.cgi?id=107249
1931
1932         Reviewed by Adam Barth.
1933
1934         This is one of steps to avoid hitting an ASSERT()
1935         that will be added in https://bugs.webkit.org/show_bug.cgi?id=107137 .
1936
1937         No tests. No change in behavior.
1938
1939         * bindings/v8/V8DOMWrapper.h:
1940         (V8DOMWrapper):
1941         (WebCore::V8DOMWrapper::setWrapperClass):
1942         (WebCore):
1943         * bindings/v8/V8NPObject.cpp:
1944         (WebCore::createV8ObjectForNPObject):
1945
1946 2013-01-20  Mike Lawther  <mikelawther@chromium.org>
1947
1948         CSS3 calc: unprefix implementation
1949         https://bugs.webkit.org/show_bug.cgi?id=91951
1950
1951         Reviewed by Ojan Vafai.
1952
1953         Add support for the unprefixed 'calc()' function, while retaining support for the prefixed version.
1954
1955         Test: css3/calc/simple-calcs-prefixed.html
1956
1957         * css/CSSCalculationValue.cpp:
1958         (WebCore::buildCssText):
1959         (WebCore::CSSCalcValue::create):
1960         * css/CSSParser.cpp:
1961         (WebCore::CSSParser::isCalculation):
1962         (WebCore::CSSParser::detectFunctionTypeToken):
1963
1964 2013-01-20  Shinya Kawanaka  <shinyak@chromium.org>
1965
1966         Distribution state becomes inconsistent with content/shadow reprojection
1967         https://bugs.webkit.org/show_bug.cgi?id=106634
1968
1969         Reviewed by Hajime Morita.
1970
1971         Distribution should be resolved from shallower ShadowDOM to deeper Shadow DOM. However, in the current implementation,
1972         there is a case that distribution for deeper ShadowDOM happens to be resolved before distribution
1973         for shallower ShadowDOM is resolved.
1974
1975         Here, we have 2 problems about distribution.
1976         1) Invalidation state is not propagated to nested (= deeper) ShadowDOM.
1977             - This causes deeper ShadowDOM looks having a valid distribution though it should be invalid.
1978         2) We are not resolving shallower ShadowDOM when deeper ShadowDOM's distribution is needed.
1979             - Because of (1), we have to check all the ancestor ShadowDOM.
1980
1981         For (1), we change invalidate() to invalidate nested ShadowDOM's distribution as well.
1982         For (2), when resolving distribution, we will check the ancestor ShadowDOM's distribution state. If the ancestor's
1983         distribution is not valid, we resolve it first.
1984
1985         For optimization of (1), actually we can skip invalidating distribution of some ShadowDOMs.
1986         If ShadowRoot of deeper ShadowDOM does not have an InsertionPoint as children, we can skip invalidating
1987         its distribution, because only children can be distributed to InsertionPoint.
1988
1989         Tests: fast/dom/shadow/distribution-crash.html
1990                fast/dom/shadow/nested-reprojection-inconsistent.html
1991
1992         * dom/ElementShadow.cpp:
1993         (WebCore::ElementShadow::attach): Should resolve distribution from ancestor.
1994         * dom/ElementShadow.h:
1995         * html/shadow/ContentDistributor.cpp:
1996         (WebCore::ContentDistributor::distribute): Added ASSERT that the parent ShadowRoot's distribution is resolved.
1997         (WebCore::ContentDistributor::invalidate): For each InsertionPoint, we have to invalidate
1998         its parent element's distribution (if it has ElementShadow).
1999         (WebCore::ContentDistributor::ensureDistribution):
2000         * html/shadow/ContentDistributor.h:
2001         (WebCore::ContentDistributor::isValid):
2002         * html/shadow/HTMLShadowElement.cpp:
2003         (WebCore::HTMLShadowElement::olderShadowRoot): Should resolve distribution from ancestor.
2004         * html/shadow/InsertionPoint.cpp:
2005         (WebCore::InsertionPoint::attach): ditto.
2006         (WebCore::InsertionPoint::detach): ditto.
2007         (WebCore::InsertionPoint::getDistributedNodes): ditto.
2008         (WebCore::resolveReprojection): ditto.
2009
2010 2013-01-20  Dominic Mazzoni  <dmazzoni@google.com>
2011
2012         Make SpeechSynthesis compile in the Chromium port
2013         https://bugs.webkit.org/show_bug.cgi?id=107382
2014
2015         Reviewed by Adam Barth.
2016
2017         Add stubs for the Chromium implementation of speech synthesis,
2018         and add all source and header files to WebCore.gypi. Everything
2019         is behind the ENABLE_SPEECH_SYNTHESIS flag.
2020
2021         * Modules/speech/chromium/SpeechSynthesisChromium.cpp: Added.
2022         (WebCore):
2023         (WebCore::SpeechSynthesis::initializeVoiceList):
2024         (WebCore::SpeechSynthesis::pending):
2025         (WebCore::SpeechSynthesis::speaking):
2026         (WebCore::SpeechSynthesis::paused):
2027         (WebCore::SpeechSynthesis::speak):
2028         (WebCore::SpeechSynthesis::cancel):
2029         (WebCore::SpeechSynthesis::pause):
2030         (WebCore::SpeechSynthesis::resume):
2031         * WebCore.gypi:
2032
2033 2013-01-20  Kent Tamura  <tkent@chromium.org>
2034
2035         Re-layout child blocks when border/padding of the box-sizing:border-box parent is updated
2036         https://bugs.webkit.org/show_bug.cgi?id=104997
2037
2038         Reviewed by Tony Chang.
2039
2040         When padding or border is updated for a parent block with
2041         box-sizing:border-box and width, the width of its child block was not
2042         updated.
2043
2044         Tests: fast/css/box-sizing-border-box-dynamic-padding-border-update.html
2045                fast/forms/text/text-padding-dynamic-change.html
2046
2047         * rendering/RenderBox.cpp:
2048         (WebCore::RenderBox::styleDidChange):
2049         If box-sizing of the old style and/or the new style is border-box and
2050         padding or border is changed, apply setChildNeedsLayout(true) for child
2051         boxes.
2052
2053 2013-01-20  Kentaro Hara  <haraken@chromium.org>
2054
2055         [V8] Remove custom V8ScriptProfileCustom::toV8()
2056         https://bugs.webkit.org/show_bug.cgi?id=107246
2057
2058         Reviewed by Adam Barth.
2059
2060         V8ScriptProfileCustom::toV8() needs not to be custom.
2061         Furthermore, the current custom toV8() is wrong in that
2062         it doesn't use a creationContext and it doesn't set a
2063         wrapper class id. This is one of steps to avoiding
2064         ASSERT()s that will be added in
2065         https://bugs.webkit.org/show_bug.cgi?id=107137 .
2066
2067         No tests. No change in behavior.
2068
2069         * UseV8.cmake:
2070         * WebCore.gypi:
2071         * bindings/v8/custom/V8ScriptProfileCustom.cpp: Removed.
2072         * inspector/ScriptProfile.idl:
2073
2074 2013-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2075
2076         Unreviewed, rolling out r140290.
2077         http://trac.webkit.org/changeset/140290
2078         https://bugs.webkit.org/show_bug.cgi?id=107412
2079
2080         Broke tests of inspector and calendar picker in debug build
2081         (Requested by tkent on #webkit).
2082
2083         * rendering/RenderBox.cpp:
2084         (WebCore::RenderBox::styleDidChange):
2085
2086 2013-01-20  Yongsheng Zhu  <yongsheng.zhu@intel.com>
2087
2088         Dispatch LongPress to inner frames
2089         https://bugs.webkit.org/show_bug.cgi?id=106874
2090
2091         Reviewed by Antonio Gomes.
2092
2093         Do check whether a LongPress gesture event should be passed
2094         to inner frames. If needed, dispatch it.
2095
2096         Tests: fast/events/touch/gesture/long-press-on-draggable-element-in-iframe-triggers-drag.html
2097                fast/events/touch/gesture/long-press-on-draggable-element-in-nested-iframes-triggers-drag.html
2098
2099         * page/EventHandler.cpp:
2100         (WebCore::EventHandler::handleGestureLongPress):
2101
2102 2013-01-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2103
2104         Clean up missing *explicit* keyword in ctors of WebCore/rendering.
2105         https://bugs.webkit.org/show_bug.cgi?id=107373
2106
2107         Reviewed by Darin Adler.
2108
2109         Need to add *explicit* keyword to avoid implicit type conversion.
2110
2111         * rendering/RenderApplet.h:
2112         (RenderApplet):
2113         * rendering/RenderArena.h:
2114         (RenderArena):
2115         * rendering/RenderBR.h:
2116         (RenderBR):
2117         * rendering/RenderBlock.h:
2118         (RenderBlock):
2119         * rendering/RenderBox.h:
2120         (RenderBox):
2121         * rendering/RenderDetailsMarker.h:
2122         (RenderDetailsMarker):
2123         * rendering/RenderFlexibleBox.h:
2124         (RenderFlexibleBox):
2125         * rendering/RenderFlowThread.h:
2126         * rendering/RenderFullScreen.h:
2127         (RenderFullScreen):
2128         * rendering/RenderGeometryMap.h:
2129         (WebCore::RenderGeometryMapStep::RenderGeometryMapStep):
2130         * rendering/RenderGrid.h:
2131         (RenderGrid):
2132         * rendering/RenderImage.h:
2133         (RenderImage):
2134         * rendering/RenderLayerBacking.h:
2135         (RenderLayerBacking):
2136         * rendering/RenderLayerCompositor.h:
2137         (RenderLayerCompositor):
2138         * rendering/RenderLayerModelObject.h:
2139         (RenderLayerModelObject):
2140         * rendering/RenderListBox.h:
2141         (RenderListBox):
2142         * rendering/RenderListMarker.h:
2143         (RenderListMarker):
2144         * rendering/RenderMedia.h:
2145         (RenderMedia):
2146         * rendering/RenderMeter.h:
2147         (RenderMeter):
2148         * rendering/RenderMultiColumnBlock.h:
2149         (RenderMultiColumnBlock):
2150         * rendering/RenderMultiColumnFlowThread.h:
2151         (RenderMultiColumnFlowThread):
2152         * rendering/RenderObject.h:
2153         (RenderObject):
2154         * rendering/RenderPart.h:
2155         (RenderPart):
2156         * rendering/RenderProgress.h:
2157         (RenderProgress):
2158         * rendering/RenderReplaced.h:
2159         (RenderReplaced):
2160         * rendering/RenderReplica.h:
2161         (RenderReplica):
2162         * rendering/RenderRuby.h:
2163         (RenderRubyAsInline):
2164         * rendering/RenderRubyBase.h:
2165         (RenderRubyBase):
2166         * rendering/RenderRubyRun.h:
2167         (RenderRubyRun):
2168         * rendering/RenderRubyText.h:
2169         (RenderRubyText):
2170         * rendering/RenderSearchField.h:
2171         (RenderSearchField):
2172         * rendering/RenderSlider.h:
2173         (RenderSlider):
2174         * rendering/RenderSnapshottedPlugIn.h:
2175         (RenderSnapshottedPlugIn):
2176         * rendering/RenderTextControlMultiLine.h:
2177         (RenderTextControlMultiLine):
2178         * rendering/RenderTextControlSingleLine.h:
2179         (RenderTextControlSingleLine):
2180         * rendering/RenderView.h:
2181         (RenderView):
2182         * rendering/RenderWidgetProtector.h:
2183         (WebCore::RenderWidgetProtector::RenderWidgetProtector):
2184         * rendering/RootInlineBox.h:
2185         (RootInlineBox): Remove meaningless parameter name.
2186         * rendering/TableLayout.h:
2187         (WebCore::TableLayout::TableLayout):
2188
2189 2013-01-20  Kent Tamura  <tkent@chromium.org>
2190
2191         Re-layout child blocks when border/padding of the box-sizing:border-box parent is updated
2192         https://bugs.webkit.org/show_bug.cgi?id=104997
2193
2194         Reviewed by Tony Chang.
2195
2196         When padding or border is updated for a parent block with
2197         box-sizing:border-box and width, the width of its child block was not
2198         updated.
2199
2200         Tests: fast/css/box-sizing-border-box-dynamic-padding-border-update.html
2201                fast/forms/text/text-padding-dynamic-change.html
2202
2203         * rendering/RenderBox.cpp:
2204         (WebCore::RenderBox::styleDidChange):
2205         If box-sizing of the old style and/or the new style is border-box and
2206         padding or border is changed, apply setChildNeedsLayout(true) for child
2207         boxes.
2208
2209 2013-01-20  Kentaro Hara  <haraken@chromium.org>
2210
2211         Unreviewed, rolling out r140270.
2212         http://trac.webkit.org/changeset/140270
2213         https://bugs.webkit.org/show_bug.cgi?id=107253
2214
2215         Hit asserts in a debug build
2216
2217         * bindings/v8/V8DOMWindowShell.cpp:
2218         (WebCore::V8DOMWindowShell::installDOMWindow):
2219
2220 2013-01-20  Shinya Kawanaka  <shinyak@chromium.org>
2221
2222         [Shadow DOM] Specifying scrollbar style of an element having RenderLayer in ShadowDOM does not work.
2223         https://bugs.webkit.org/show_bug.cgi?id=107222
2224
2225         Reviewed by Simon Fraser.
2226
2227         When specifying scrollbar style in ShadowDOM, it's not used. If the host element of ShadowDOM has scrollbar style,
2228         it's used instead.
2229
2230         The root cause of this bug is that RenderLayer always see shadowAncestorNode's style. Some elements having
2231         UserAgent ShadowDOM (e.g. <textarea>) should see host's style, but most of elements should see its style.
2232
2233         Test: fast/dom/shadow/scrollbar.html
2234
2235         * rendering/RenderLayer.cpp:
2236         (WebCore::rendererForScrollbar):
2237         (WebCore):
2238         (WebCore::RenderLayer::createScrollbar):
2239         (WebCore::RenderLayer::updateScrollCornerStyle):
2240         (WebCore::RenderLayer::updateResizerStyle):
2241
2242 2013-01-20  Yoshifumi Inoue  <yosin@chromium.org>
2243
2244         Dragging over an element with scrollbars should scroll the element when dragging near edges
2245         https://bugs.webkit.org/show_bug.cgi?id=39725
2246
2247         Reviewed by Hajime Morita.
2248
2249         This patch introduces auto scrolling functionality during drag-and-drop
2250         when drop source is near edge of scrollable element.
2251
2252         When drop source is inside 20px of scrollable element more than 200ms,
2253         scrollable element is automatically scrolled every 50ms toward drop
2254         source position, e.g. vertically scroll up when drop source is in top
2255         edge.
2256
2257         Test: fast/events/drag-and-drop-autoscroll.html
2258
2259         * page/AutoscrollController.cpp:
2260         (WebCore::AutoscrollController::AutoscrollController): Changed to initialize m_dragAndDropAutoscrollStartTime.
2261         (WebCore::AutoscrollController::updateDragAndDrop): Added for start/stop autoscroll during drag-and-drop.
2262         (WebCore::AutoscrollController::autoscrollTimerFired): Changed to add autoscroll for drag-and-drop, and to pass last know position to RenderBox::autoscroll().
2263         * page/AutoscrollController.h:
2264         (AutoscrollController): Changed to add updateDragAndDrop() and m_dragAndDropAutoscrollReferencePosition and m_dragAndDropAutoscrollStartTime.
2265         * page/ChromeClient.h:
2266         (WebCore::ChromeClient): Changed to add new function shouldAutoscrollForDragAndDrop().
2267         * page/EventHandler.cpp:
2268         (WebCore::EventHandler::updateDragAndDrop): Changed to call AutoscrollController::updateDragAndDrop().
2269         (WebCore::EventHandler::clearDragState): Changed to call stopAutoscrollTimer().
2270         * rendering/RenderBox.cpp:
2271         (WebCore::RenderBox::autoscroll): Changed for new parameter position.
2272         (WebCore::RenderBox::calculateAutoscrollDirection): Added for autoscroll.
2273         * rendering/RenderBox.h:
2274         (RenderBox):
2275         * rendering/RenderLayer.cpp:
2276         (WebCore::RenderLayer::autoscroll):  Changed for new parameter position and move updateSelectionForMouseDrag() to AutoscrollController.
2277         * rendering/RenderLayer.h:
2278         (RenderLayer):
2279         * rendering/RenderListBox.cpp:
2280         (WebCore::RenderListBox::autoscroll):  Changed for new parameter position.
2281         * rendering/RenderListBox.h:
2282         (RenderListBox):
2283         * rendering/RenderTextControlSingleLine.cpp:
2284         (WebCore::RenderTextControlSingleLine::autoscroll):  Changed for new parameter position.
2285         * rendering/RenderTextControlSingleLine.h:
2286         (RenderTextControlSingleLine):
2287
2288 2013-01-20  Laszlo Gombos  <l.gombos@samsung.com>
2289
2290         Simplify a list of negative PLATFORM() tests
2291         https://bugs.webkit.org/show_bug.cgi?id=107365
2292
2293         Reviewed by Eric Seidel.
2294
2295         Simplify a list of negative PLATFORM() tests into a simpler list
2296         of positive tests for better readability and maintenance.
2297
2298         No new tests as there is no new functionality.
2299
2300         * config.h:
2301
2302 2013-01-20  Simon Fraser  <simon.fraser@apple.com>
2303
2304         Avoid filling a rounded rect when radii are zero
2305         https://bugs.webkit.org/show_bug.cgi?id=107402
2306         <rdar://problem/12793315>
2307
2308         Reviewed by Sam Weinig.
2309
2310         It's more efficient to clip and fill rects than rounded rects,
2311         so optimize for the case where rounded rect radii are zero.
2312
2313         * platform/graphics/GraphicsContext.cpp:
2314         (WebCore::GraphicsContext::clipRoundedRect):
2315         (WebCore::GraphicsContext::clipOutRoundedRect):
2316         (WebCore::GraphicsContext::fillRoundedRect):
2317
2318 2013-01-20  Alexey Proskuryakov  <ap@apple.com>
2319
2320         Remove obsolete plug-in sandboxing code.
2321         https://bugs.webkit.org/show_bug.cgi?id=107362
2322
2323         Reviewed by Darin Adler.
2324
2325         * WebCore.xcodeproj/project.pbxproj:
2326         * plugins/npapi-sandbox.h: Removed.
2327
2328 2013-01-20  Peter Rybin  <peter.rybin@gmail.com>
2329
2330         Web Inspector: Make V8 LiveEdit API disabled by default
2331         https://bugs.webkit.org/show_bug.cgi?id=106668
2332
2333         Reviewed by Yury Semikhatsky.
2334
2335         Initialize method is patched accordingly.
2336
2337         * bindings/v8/JavaScriptCallFrame.cpp:
2338         (WebCore::JavaScriptCallFrame::restart): missing enable/disable calls added for restart
2339         * bindings/v8/V8Initializer.cpp:
2340         (WebCore::initializeV8Common): initializer method patched
2341
2342 2013-01-20  Christophe Dumez  <christophe.dumez@intel.com>
2343
2344         [gstreamer]  assertion in g_object_unref from _WebKitWebAudioSourcePrivate destructor
2345         https://bugs.webkit.org/show_bug.cgi?id=107374
2346
2347         Reviewed by Philippe Normand.
2348
2349         WebKitWebAudioSrc object gets unrefed one time too many in
2350         _WebKitWebAudioSourcePrivate destructor, causing an assertion
2351         in g_object_unref. This patch passes NULL instead of
2352         g_object_unref to gst_task_new() so that the WebKitWebAudioSrc
2353         object does not get unrefed when the GstTask is destroyed.
2354
2355         No new tests, already covered by webaudio tests.
2356
2357         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2358         (webkit_web_audio_src_init):
2359
2360 2013-01-20  Kentaro Hara  <haraken@chromium.org>
2361
2362         [V8] Create a persistent wrapper for Window.prototype and innerGlobalObject
2363         https://bugs.webkit.org/show_bug.cgi?id=107253
2364
2365         Reviewed by Adam Barth.
2366
2367         This is one of steps to avoid hitting an ASSERT()
2368         that will be added in https://bugs.webkit.org/show_bug.cgi?id=107137 .
2369         We should have a persistent wrapper for all DOM objects
2370         and set a class id on the wrapper.
2371
2372         No tests. No change in behavior.
2373
2374         * bindings/v8/V8DOMWindowShell.cpp:
2375         (WebCore::V8DOMWindowShell::installDOMWindow):
2376
2377 2013-01-19  Philip Rogers  <pdr@google.com>
2378
2379         Refactor SVGSVGElement to inherit from SVGStyledTransformableElement
2380         https://bugs.webkit.org/show_bug.cgi?id=107393
2381
2382         Reviewed by Dirk Schulze.
2383
2384         This patch refactors SVGSVGElement to inherit from SVGStyledTransformableElement instead
2385         of SVGStyledLocatableElement. In a followup patch, SVGStyledTransformableElement will
2386         be refactored into SVGGraphicsElement which will match the spec:
2387         https://svgwg.org/svg2-draft/single-page.html#struct-InterfaceSVGSVGElement
2388
2389         Tests: svg/transforms/svgsvgelement-transform-expected.svg
2390                svg/transforms/svgsvgelement-transform.svg
2391
2392         * svg/SVGSVGElement.cpp:
2393         (WebCore):
2394         (WebCore::SVGSVGElement::SVGSVGElement):
2395         (WebCore::SVGSVGElement::didMoveToNewDocument):
2396         (WebCore::SVGSVGElement::parseAttribute):
2397         (WebCore::SVGSVGElement::insertedInto):
2398         (WebCore::SVGSVGElement::removedFrom):
2399         * svg/SVGSVGElement.h:
2400         (SVGSVGElement):
2401         * svg/SVGSVGElement.idl:
2402
2403 2013-01-19  Philip Rogers  <pdr@google.com>
2404
2405         Merge SVGStylable into SVGStyledElement
2406         https://bugs.webkit.org/show_bug.cgi?id=106877
2407
2408         Reviewed by Dirk Schulze.
2409
2410         SVG2 changes element inheritance so all SVGElements are stylable. As a first-step towards a
2411         cleaner class hierarchy, this patch moves SVGStylable into SVGStyledElement.
2412
2413         No new tests as this is just a refactoring.
2414
2415         * CMakeLists.txt:
2416         * DerivedSources.make:
2417         * GNUmakefile.list.am:
2418         * Target.pri:
2419         * WebCore.exp.in:
2420         * WebCore.gyp/WebCore.gyp:
2421         * WebCore.gypi:
2422         * WebCore.vcproj/WebCore.vcproj:
2423         * WebCore.xcodeproj/project.pbxproj:
2424         * bindings/objc/DOMSVG.h:
2425         * bindings/scripts/CodeGeneratorObjC.pm:
2426         * page/DOMWindow.idl:
2427         * svg/SVGAElement.idl:
2428         * svg/SVGAllInOne.cpp:
2429         * svg/SVGCircleElement.idl:
2430         * svg/SVGClipPathElement.idl:
2431         * svg/SVGDefsElement.idl:
2432         * svg/SVGDescElement.idl:
2433         * svg/SVGEllipseElement.idl:
2434         * svg/SVGFEBlendElement.idl:
2435         * svg/SVGFEColorMatrixElement.idl:
2436         * svg/SVGFEComponentTransferElement.idl:
2437         * svg/SVGFECompositeElement.idl:
2438         * svg/SVGFEConvolveMatrixElement.idl:
2439         * svg/SVGFEDiffuseLightingElement.idl:
2440         * svg/SVGFEDisplacementMapElement.idl:
2441         * svg/SVGFEDropShadowElement.idl:
2442         * svg/SVGFEFloodElement.idl:
2443         * svg/SVGFEGaussianBlurElement.idl:
2444         * svg/SVGFEImageElement.idl:
2445         * svg/SVGFEMergeElement.idl:
2446         * svg/SVGFEMorphologyElement.idl:
2447         * svg/SVGFEOffsetElement.idl:
2448         * svg/SVGFESpecularLightingElement.idl:
2449         * svg/SVGFETileElement.idl:
2450         * svg/SVGFETurbulenceElement.idl:
2451         * svg/SVGFilterElement.idl:
2452         * svg/SVGFilterPrimitiveStandardAttributes.idl:
2453         * svg/SVGForeignObjectElement.idl:
2454         * svg/SVGGElement.idl:
2455         * svg/SVGGlyphRefElement.idl:
2456         * svg/SVGGradientElement.idl:
2457         * svg/SVGImageElement.idl:
2458         * svg/SVGLineElement.idl:
2459         * svg/SVGMarkerElement.idl:
2460         * svg/SVGMaskElement.idl:
2461         * svg/SVGMissingGlyphElement.idl:
2462         * svg/SVGPathElement.idl:
2463         * svg/SVGPatternElement.idl:
2464         * svg/SVGPolygonElement.idl:
2465         * svg/SVGPolylineElement.idl:
2466         * svg/SVGRectElement.idl:
2467         * svg/SVGSVGElement.idl:
2468         * svg/SVGStopElement.idl:
2469         * svg/SVGStylable.cpp: Removed.
2470         * svg/SVGStylable.h: Removed.
2471         * svg/SVGStylable.idl: Removed.
2472         * svg/SVGStyledElement.h:
2473         (WebCore):
2474         * svg/SVGStyledElement.idl: Added.
2475         * svg/SVGSwitchElement.idl:
2476         * svg/SVGSymbolElement.idl:
2477         * svg/SVGTextContentElement.idl:
2478         * svg/SVGTitleElement.idl:
2479         * svg/SVGUseElement.idl:
2480
2481 2013-01-19  Tim Horton  <timothy_horton@apple.com>
2482
2483         CanvasRenderingContext2D::drawTextInternal should create a mask buffer compatible with that of the canvas
2484         https://bugs.webkit.org/show_bug.cgi?id=107372
2485
2486         Reviewed by Simon Fraser.
2487
2488         No new tests, just matching acceleration modes.
2489
2490         * html/canvas/CanvasRenderingContext2D.cpp:
2491         (WebCore::CanvasRenderingContext2D::drawTextInternal): Create a buffer with the same acceleration mode as the canvas
2492         instead of forcing the use of an accelerated buffer if we support acceleration; the canvas could be unaccelerated
2493         even if USE(IOSURFACE_CANVAS_BACKING_STORE) is on.
2494
2495 2013-01-19  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2496
2497         Delegated scrolling: Assertion on attempt to show a CSS sticky element
2498         https://bugs.webkit.org/show_bug.cgi?id=106890
2499
2500         Reviewed by Kenneth Rohde Christiansen.
2501
2502         The problem was that frame view (when delegated scrolling enabled) calculated the positions of sticky elements for
2503         a scroll event before sending scroll request. In case of multiple scroll events that caused assertion as the response
2504         for previous scroll request was received after the expected sticky elements positions had been already updated for the following
2505         scroll request.
2506
2507         No new tests. Covered by existing 'fast/css/sticky' tests.
2508
2509         * page/FrameView.cpp:
2510         (WebCore::FrameView::setFixedVisibleContentRect):
2511         * platform/ScrollView.cpp:
2512         (WebCore::ScrollView::scrollTo):
2513
2514 2013-01-19  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2515
2516         [EFL][WebGL] Regression: WebGL Content is not drawn after resizing the canvas.
2517         https://bugs.webkit.org/show_bug.cgi?id=107366
2518
2519         Reviewed by Kenneth Rohde Christiansen.
2520
2521         Window is shared between GraphicsSurface and its client.
2522         Client doesn't own the Window. This patch ensures that client
2523         doesn't delete the shared Window handle.
2524
2525         Covered by existing WebGL tests.
2526
2527         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
2528         (WebCore::GraphicsSurfacePrivate::clear):
2529
2530 2013-01-18  Antti Koivisto  <antti@apple.com>
2531
2532         Make renderer constructors take Element where possible
2533         https://bugs.webkit.org/show_bug.cgi?id=107138
2534
2535         Reviewed by David Hyatt.
2536         
2537         Tighter typing prevents bugs and enables optimizations.
2538
2539         The patch changes how anonymous rendererer are constructed. Previously Document* as the node parameter
2540         indicated that the renderer was anonymous. This forced the code to operate on ContainerNodes (Document
2541         is not an Element). Now anonymous renderers are constructed by passing null and the document is set by
2542         separate setDocumentForAnonymous() call. The patch uses RenderFoo::createAnonymous() pattern consistently.
2543
2544         Most constructors are switched to take Element. RenderBlock still takes ContainerNode due to a few subclasses
2545         (RenderView and RenderFlowThread) that pass in a Document.
2546
2547         * page/FrameView.cpp:
2548         (WebCore::FrameView::updateScrollCorner):
2549         * rendering/RenderBlock.cpp:
2550         (WebCore::RenderBlock::createAnonymous):
2551         (WebCore::RenderBlock::createReplacementRunIn):
2552         (WebCore::RenderBlock::updateFirstLetterStyle):
2553         (WebCore::RenderBlock::createFirstLetterRenderer):
2554         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
2555         (WebCore::RenderBlock::createAnonymousColumnsWithParentRenderer):
2556         (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRenderer):
2557         * rendering/RenderBlock.h:
2558         * rendering/RenderDeprecatedFlexibleBox.cpp:
2559         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
2560         (WebCore::RenderDeprecatedFlexibleBox::createAnonymous):
2561         * rendering/RenderDeprecatedFlexibleBox.h:
2562         (RenderDeprecatedFlexibleBox):
2563         * rendering/RenderDetailsMarker.cpp:
2564         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
2565         * rendering/RenderDetailsMarker.h:
2566         (RenderDetailsMarker):
2567         * rendering/RenderDialog.h:
2568         (WebCore::RenderDialog::RenderDialog):
2569         * rendering/RenderFieldset.cpp:
2570         (WebCore::RenderFieldset::RenderFieldset):
2571         * rendering/RenderFieldset.h:
2572         * rendering/RenderFlexibleBox.cpp:
2573         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
2574         * rendering/RenderFlexibleBox.h:
2575         (RenderFlexibleBox):
2576         * rendering/RenderFlowThread.cpp:
2577         (WebCore::RenderFlowThread::RenderFlowThread):
2578         * rendering/RenderFlowThread.h:
2579         * rendering/RenderFullScreen.cpp:
2580         (RenderFullScreenPlaceholder::RenderFullScreenPlaceholder):
2581         (RenderFullScreen::RenderFullScreen):
2582         (RenderFullScreen::createAnonymous):
2583         (RenderFullScreen::wrapRenderer):
2584         * rendering/RenderFullScreen.h:
2585         (RenderFullScreen):
2586         * rendering/RenderGrid.cpp:
2587         (WebCore::RenderGrid::RenderGrid):
2588         * rendering/RenderGrid.h:
2589         * rendering/RenderImage.cpp:
2590         (WebCore::RenderImage::RenderImage):
2591         (WebCore::RenderImage::createAnonymous):
2592         * rendering/RenderImage.h:
2593         * rendering/RenderInline.cpp:
2594         (WebCore::RenderInline::RenderInline):
2595         (WebCore::RenderInline::createAnonymous):
2596         (WebCore::RenderInline::addChildIgnoringContinuation):
2597         * rendering/RenderInline.h:
2598         (RenderInline):
2599         (WebCore::RenderInline::node):
2600         
2601             Add version with covariant Element return type.
2602
2603         * rendering/RenderLayer.cpp:
2604         (WebCore::RenderLayer::updateScrollCornerStyle):
2605         (WebCore::RenderLayer::updateResizerStyle):
2606         (WebCore::RenderLayer::createReflection):
2607         (WebCore::RenderListItem::RenderListItem):
2608         (WebCore::RenderListItem::styleDidChange):
2609         * rendering/RenderListItem.h:
2610         * rendering/RenderListMarker.cpp:
2611         (WebCore::RenderListMarker::RenderListMarker):
2612         (WebCore::RenderListMarker::createAnonymous):
2613         * rendering/RenderListMarker.h:
2614         * rendering/RenderMediaControlElements.cpp:
2615         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
2616         (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
2617         (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
2618         * rendering/RenderMediaControlElements.h:
2619         (RenderMediaVolumeSliderContainer):
2620         (RenderMediaControlTimeDisplay):
2621         (RenderTextTrackContainerElement):
2622         * rendering/RenderMultiColumnBlock.cpp:
2623         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
2624         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
2625         * rendering/RenderMultiColumnBlock.h:
2626         * rendering/RenderMultiColumnFlowThread.cpp:
2627         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
2628         * rendering/RenderMultiColumnFlowThread.h:
2629         (RenderMultiColumnFlowThread):
2630         * rendering/RenderMultiColumnSet.cpp:
2631         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
2632         (WebCore::RenderMultiColumnSet::createAnonymous):
2633         * rendering/RenderMultiColumnSet.h:
2634         (RenderMultiColumnSet):
2635         * rendering/RenderNamedFlowThread.cpp:
2636         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2637         * rendering/RenderNamedFlowThread.h:
2638         (RenderNamedFlowThread):
2639         * rendering/RenderObject.cpp:
2640         (WebCore::RenderObject::RenderObject):
2641         * rendering/RenderObject.h:
2642         
2643              Passed in null node indicates that the renderer is anonymous. Remove now unnecessary setIsAnonymous() function.
2644
2645         (WebCore::RenderObject::isAnonymous):
2646         (WebCore::RenderObject::setDocumentForAnonymous):
2647         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2648         * rendering/RenderRegion.cpp:
2649         (WebCore::RenderRegion::RenderRegion):
2650         * rendering/RenderRegion.h:
2651         * rendering/RenderRegionSet.cpp:
2652         (WebCore::RenderRegionSet::RenderRegionSet):
2653         * rendering/RenderRegionSet.h:
2654         * rendering/RenderReplaced.cpp:
2655         (WebCore::RenderReplaced::RenderReplaced):
2656         * rendering/RenderReplaced.h:
2657         * rendering/RenderReplica.cpp:
2658         (WebCore::RenderReplica::RenderReplica):
2659         (WebCore::RenderReplica::createAnonymous):
2660         * rendering/RenderReplica.h:
2661         (RenderReplica):
2662         * rendering/RenderRuby.cpp:
2663         (WebCore::createAnonymousRubyInlineBlock):
2664         (WebCore::RenderRubyAsInline::RenderRubyAsInline):
2665         (WebCore::RenderRubyAsBlock::RenderRubyAsBlock):
2666         * rendering/RenderRuby.h:
2667         (RenderRubyAsInline):
2668         (RenderRubyAsBlock):
2669         * rendering/RenderRubyBase.cpp:
2670         (WebCore::RenderRubyBase::RenderRubyBase):
2671         (WebCore::RenderRubyBase::createAnonymous):
2672         * rendering/RenderRubyBase.h:
2673         (RenderRubyBase):
2674         * rendering/RenderRubyRun.cpp:
2675         (WebCore::RenderRubyRun::RenderRubyRun):
2676         (WebCore::RenderRubyRun::createRubyBase):
2677         (WebCore::RenderRubyRun::staticCreateRubyRun):
2678         * rendering/RenderRubyRun.h:
2679         * rendering/RenderRubyText.cpp:
2680         (WebCore::RenderRubyText::RenderRubyText):
2681         * rendering/RenderRubyText.h:
2682         * rendering/RenderScrollbar.cpp:
2683         (WebCore::RenderScrollbar::updateScrollbarPart):
2684         * rendering/RenderScrollbarPart.cpp:
2685         (WebCore::RenderScrollbarPart::RenderScrollbarPart):
2686         (WebCore::RenderScrollbarPart::createAnonymous):
2687         * rendering/RenderScrollbarPart.h:
2688         (RenderScrollbarPart):
2689         * rendering/RenderSearchField.cpp:
2690         (WebCore::RenderSearchField::RenderSearchField):
2691         * rendering/RenderSearchField.h:
2692         (RenderSearchField):
2693         * rendering/RenderTable.cpp:
2694         (WebCore::RenderTable::RenderTable):
2695         (WebCore::RenderTable::createAnonymousWithParentRenderer):
2696         * rendering/RenderTable.h:
2697         * rendering/RenderTableCaption.cpp:
2698         (WebCore::RenderTableCaption::RenderTableCaption):
2699         * rendering/RenderTableCaption.h:
2700         * rendering/RenderTableCell.cpp:
2701         (WebCore::RenderTableCell::RenderTableCell):
2702         (WebCore::RenderTableCell::createAnonymousWithParentRenderer):
2703         * rendering/RenderTableCell.h:
2704         * rendering/RenderTableCol.cpp:
2705         (WebCore::RenderTableCol::RenderTableCol):
2706         * rendering/RenderTableCol.h:
2707         * rendering/RenderTableRow.cpp:
2708         (WebCore::RenderTableRow::RenderTableRow):
2709         (WebCore::RenderTableRow::createAnonymousWithParentRenderer):
2710         * rendering/RenderTableRow.h:
2711         * rendering/RenderTableSection.cpp:
2712         (WebCore::RenderTableSection::RenderTableSection):
2713         (WebCore::RenderTableSection::createAnonymousWithParentRenderer):
2714         * rendering/RenderTableSection.h:
2715         * rendering/RenderText.cpp:
2716         (WebCore::RenderText::RenderText):
2717         
2718             Pass null and use setDocumentForAnonymous() if a RenderText is created with the Document as renderer
2719             to keep them working. Text renderers should be factored similarly to the rest.
2720
2721         * rendering/RenderTextControl.cpp:
2722         (WebCore::RenderTextControl::RenderTextControl):
2723         * rendering/RenderTextControl.h:
2724         * rendering/RenderTextControlMultiLine.cpp:
2725         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
2726         * rendering/RenderTextControlMultiLine.h:
2727         (RenderTextControlMultiLine):
2728         * rendering/RenderTextControlSingleLine.cpp:
2729         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2730         * rendering/RenderTextControlSingleLine.h:
2731         (RenderTextControlSingleLine):
2732         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
2733         * rendering/RenderTextTrackCue.cpp:
2734         (WebCore::RenderTextTrackCue::RenderTextTrackCue):
2735         * rendering/RenderView.cpp:
2736         (WebCore::RenderView::RenderView):
2737         * rendering/RenderWidget.cpp:
2738         (WebCore::RenderWidget::RenderWidget):
2739         * rendering/RenderWidget.h:
2740         * rendering/mathml/RenderMathMLBlock.cpp:
2741         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
2742         (WebCore::RenderMathMLBlock::createAnonymousMathMLBlock):
2743         * rendering/mathml/RenderMathMLBlock.h:
2744         * rendering/mathml/RenderMathMLFenced.cpp:
2745         (WebCore::RenderMathMLFenced::createMathMLOperator):
2746         * rendering/mathml/RenderMathMLOperator.cpp:
2747         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
2748         (WebCore::RenderMathMLOperator::updateFromElement):
2749         (WebCore::RenderMathMLOperator::createGlyph):
2750         * rendering/mathml/RenderMathMLOperator.h:
2751         * rendering/mathml/RenderMathMLRow.cpp:
2752         (WebCore::RenderMathMLRow::RenderMathMLRow):
2753         (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer):
2754         * rendering/mathml/RenderMathMLRow.h:
2755         * rendering/style/ContentData.cpp:
2756         (WebCore::ImageContentData::createRenderer):
2757         * rendering/svg/RenderSVGBlock.cpp:
2758         (WebCore::RenderSVGBlock::RenderSVGBlock):
2759         * rendering/svg/RenderSVGInline.cpp:
2760         (WebCore::RenderSVGInline::RenderSVGInline):
2761         * rendering/svg/RenderSVGInline.h:
2762         * rendering/svg/RenderSVGTSpan.cpp:
2763         (WebCore::RenderSVGTSpan::RenderSVGTSpan):
2764         * rendering/svg/RenderSVGTSpan.h:
2765         * rendering/svg/RenderSVGTextPath.cpp:
2766         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
2767         * rendering/svg/RenderSVGTextPath.h:
2768
2769 2013-01-19  Zan Dobersek  <zdobersek@igalia.com>
2770
2771         Unreviewed GTK build fix.
2772
2773         Add the build targets introduced in r140231 to the list.
2774
2775         * GNUmakefile.list.am:
2776
2777 2013-01-18  Huang Dongsung  <luxtella@company100.net>
2778
2779         [Mac] Remove unused pageScaleFactor and positionRelativeToBase arguments in GraphicsLayerCA.
2780         https://bugs.webkit.org/show_bug.cgi?id=107357
2781
2782         Reviewed by Ryosuke Niwa.
2783
2784         Several methods in GraphicsLayerCA receive a pageScaleFactor or a
2785         positionRelativeToBase argument but don't use the arguments, so this patch
2786         removes them.
2787
2788         No new tests. This is just a refactoring of the existing code.
2789
2790         * platform/graphics/ca/GraphicsLayerCA.cpp:
2791         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2792         (WebCore::GraphicsLayerCA::updateGeometry):
2793         (WebCore::GraphicsLayerCA::updateStructuralLayer):
2794         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2795         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
2796         (WebCore::GraphicsLayerCA::updateContentsScale):
2797         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2798         * platform/graphics/ca/GraphicsLayerCA.h:
2799         (GraphicsLayerCA):
2800
2801 2013-01-18  Dimitri Glazkov  <dglazkov@chromium.org>
2802
2803         Move attributeNameMatches from SelectorChecker to its proper place on Attribute.
2804         https://bugs.webkit.org/show_bug.cgi?id=107358
2805
2806         Reviewed by Andreas Kling.
2807
2808         Refactoring, covered by existing tests.
2809
2810         * css/SelectorChecker.cpp:
2811         (WebCore::anyAttributeMatches): Changed to use the new name.
2812         * css/SelectorChecker.h:
2813         (SelectorChecker): Moved attributeNameMatches out of here.
2814         (WebCore::SelectorChecker::checkExactAttribute): Changed to use the new name.
2815         * dom/Attribute.h:
2816         (WebCore::Attribute::matches): Moved attributeNameMatches to here.
2817
2818 2013-01-18  Simon Fraser  <simon.fraser@apple.com>
2819
2820         Fix bug that caused pages with fixed backgrounds to not be fast scrollable
2821         https://bugs.webkit.org/show_bug.cgi?id=107354
2822
2823         Reviewed by Sam Weinig.
2824
2825         Correct the change to RenderObject::styleWillChange() made in r140223. This
2826         condition is checking that we're painting the root background, so it checks if
2827         the renderer is the root, or if it's the body, and the document element's renderer
2828         has no background (which means that the body's background propagates to the root).
2829
2830         * rendering/RenderObject.cpp:
2831         (WebCore::RenderObject::styleWillChange):
2832
2833 2013-01-18  Dima Gorbik  <dgorbik@apple.com>
2834
2835         Remove a TextTrack.h include from the Element.h and move WebVTT related stuff outside the Element
2836         https://bugs.webkit.org/show_bug.cgi?id=107080
2837
2838         Reviewed by Sam Weinig.
2839
2840         WebVTT objects are now subclasses of the Element. This allows us to remove major WebVTT chunks of code from
2841         Element.h and NodeRareData. WebVTTElement is deriving from HTMLElement and not Element to prevent possible
2842         problems that could happen because we reuse qTags that are being used in HTML like <b>, <i> and <u>.
2843
2844         No new tests. This is just a refactoring of the existing code.
2845
2846         * CMakeLists.txt:
2847         * WebCore.gypi:
2848         * WebCore.xcodeproj/project.pbxproj:
2849         * css/SelectorChecker.cpp:
2850         (WebCore::SelectorChecker::checkOne):
2851         * css/StyleResolver.cpp:
2852         (WebCore::StyleResolver::collectMatchingRules):
2853         (WebCore::StyleResolver::canShareStyleWithElement):
2854         * dom/Element.cpp:
2855         * dom/Element.h:
2856         * dom/ElementRareData.h:
2857         (WebCore::ElementRareData::ElementRareData):
2858         * dom/Node.h:
2859         (WebCore::Node::isWebVTTElement):
2860         * html/track/TextTrack.h:
2861         * html/track/TextTrackCue.cpp:
2862         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree):
2863         (WebCore::TextTrackCue::markFutureAndPastNodes):
2864         * html/track/WebVTTElement.cpp: Added.
2865         (WebCore::WebVTTElement::create):
2866         (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren):
2867         * html/track/WebVTTElement.h: Added.
2868         (WebCore::WebVTTElement::setWebVTTNodeType):
2869         (WebCore::WebVTTElement::webVTTNodeType):
2870         (WebCore::WebVTTElement::WebVTTElement):
2871         (WebCore::toWebVTTElement):
2872         * html/track/WebVTTParser.cpp:
2873         (WebCore::WebVTTParser::constructTreeFromToken):
2874
2875 2013-01-18  Beth Dakin  <bdakin@apple.com>
2876
2877         https://bugs.webkit.org/show_bug.cgi?id=106946
2878         Sticky-position elements can jump around/hide on rubber-banding
2879
2880         Reviewed by Simon Fraser.
2881
2882         This patch adds a new function called viewportConstrainedVisibleContentRect() 
2883         since there are a number of places where we need a visibleContectRect() that does 
2884         not allow scroll offsets that indicate the rubber-banding that is happening. And 
2885         this patch fixes the bug for sticky by calling this function in two new places.
2886
2887         * page/FrameView.cpp:
2888         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
2889         (WebCore):
2890         * page/FrameView.h:
2891         (FrameView):
2892         * page/scrolling/ScrollingCoordinator.cpp:
2893         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
2894         * rendering/RenderBoxModelObject.cpp:
2895         (WebCore::RenderBoxModelObject::stickyPositionOffset):
2896         * rendering/RenderLayerCompositor.cpp:
2897         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2898         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2899
2900 2013-01-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2901
2902         Unreviewed, rolling out r140206.
2903         http://trac.webkit.org/changeset/140206
2904         https://bugs.webkit.org/show_bug.cgi?id=107346
2905
2906         Caused crash on wordpress.com (Requested by smfr on #webkit).
2907
2908         * rendering/RenderBox.cpp:
2909         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
2910
2911 2013-01-18  Simon Fraser  <simon.fraser@apple.com>
2912
2913         Allow fixed background layers to be moved by the ScrollingCoordinator
2914         https://bugs.webkit.org/show_bug.cgi?id=107213
2915
2916         Reviewed by Tim Horton.
2917         
2918         Start using the RenderView's RenderLayerBacking's background layer for
2919         fixed root backgrounds (those which have background images all of which have
2920         background-attachment: fixed).
2921         
2922         The background-layer is contained in the RenderLayer's RenderLayerBacking's
2923         containment view, so it gets page scale applied to it, but scrolling happens
2924         above this layer, so the background has to be counter-scrolled. We plumb
2925         this layer through to the ScrollingCoordinator so that this counter-scrolling
2926         can be done on the scrolling thread.
2927         
2928         Test: platform/mac/tiled-drawing/fixed-background/fixed-body-background-positioned.html
2929
2930         * WebCore.xcodeproj/project.pbxproj: Add ScrollingStateScrollingNodeMac.mm
2931         * page/scrolling/ScrollingCoordinator.cpp:
2932         (WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView): New function to get
2933         the counter-scrolling layer.
2934         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition): Sync or set the position of the
2935         counter-scrolling layer just like we do for the main scrolling layer.
2936         * page/scrolling/ScrollingCoordinator.h:
2937         (WebCore::ScrollingCoordinator::updateScrollingNode):
2938         * page/scrolling/ScrollingStateNode.cpp:
2939         (WebCore::ScrollingStateNode::ScrollingStateNode): setScrollLayer() renamed to setScrollPlatformLayer(),
2940         and added a FIXME comment because this code is confusing and possibly wrong.
2941         * page/scrolling/ScrollingStateNode.h: Renamed setScrollLayer() to setScrollPlatformLayer().
2942         * page/scrolling/ScrollingStateScrollingNode.cpp:
2943         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2944         * page/scrolling/ScrollingStateScrollingNode.h:
2945         (ScrollingStateScrollingNode): Track the counter-scrolling layer.
2946         (WebCore::ScrollingStateScrollingNode::counterScrollingLayer):
2947         (WebCore::ScrollingStateScrollingNode::counterScrollingLayerDidChange):
2948         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayerDidChange):
2949         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2950         (ScrollingCoordinatorMac): Add updateScrollingNode() which is less expensive than frameViewRootLayerDidChange()
2951         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2952         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange): Fetch the counter-scrolling layer if we have one.
2953         (WebCore::ScrollingCoordinatorMac::setCounterScrollingLayerForNode):
2954         (WebCore::ScrollingCoordinatorMac::updateScrollingNode):
2955         * page/scrolling/mac/ScrollingStateNodeMac.mm:
2956         (WebCore::ScrollingStateNode::setScrollPlatformLayer):
2957         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: New file for implementation of setCounterScrollingLayer().
2958         (WebCore::ScrollingStateScrollingNode::counterScrollingPlatformLayer):
2959         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
2960         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2961         (ScrollingTreeScrollingNodeMac):
2962         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2963         (WebCore::ScrollingTreeScrollingNodeMac::update):
2964         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2965         * rendering/RenderBoxModelObject.cpp:
2966         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
2967         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): If we're painting into the fixed root layer,
2968         we want to always paint with the top,left at 0,0.
2969         * rendering/RenderBoxModelObject.h:
2970         * rendering/RenderLayerBacking.cpp:
2971         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): In the fixed root background case,
2972         we can make the background layer viewport-sized, and we have to set its counter-scrolled position.
2973         (WebCore::RenderLayerBacking::updateBackgroundLayer): If the background layer was created or destroyed,
2974         we have to tell the ScrollingCoordinator.
2975         (WebCore::RenderLayerBacking::didCommitChangesForLayer): Send the GraphicsLayer down.
2976         * rendering/RenderLayerCompositor.cpp:
2977         (WebCore::RenderLayerCompositor::didFlushChangesForLayer): If the background layer changed (e.g. it became
2978         tiled) we need to tell the ScrollingCoordinator.
2979         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): We failed to update the borders on new
2980         layers sometimes; this fixes that.
2981         (WebCore::RenderLayerCompositor::frameViewDidScroll): In the non-threaded scrolling case, if we have
2982         a fixed background layer, we need to update its position.
2983         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged): Feed the newly created/destroyed layer
2984         down to the ScrollingCoordinator.
2985         (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
2986         (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
2987         * rendering/RenderLayerCompositor.h:
2988         * rendering/RenderObject.cpp:
2989         (WebCore::rendererHasBackground):
2990         (WebCore::RenderObject::styleWillChange): If the compositor supports fixed root backgrounds, we no longer
2991         treat these as slow repaint objects.
2992         * rendering/RenderView.cpp:
2993         (WebCore::RenderView::rootBackgroundIsEntirelyFixed): Helper function called by RLC.
2994         * rendering/RenderView.h:
2995
2996 2013-01-18  Alec Flett  <alecflett@chromium.org>
2997
2998         IndexedDB: Switch to new createTransaction call
2999         https://bugs.webkit.org/show_bug.cgi?id=107311
3000
3001         Reviewed by Tony Chang.
3002
3003         Convert frontend callers to use the new backend createTransaction
3004         call which is the final divorce between the frontend and backend
3005         transaction objects. This allows an asynchronous call in Chromium
3006         and allows the front and backend to have their own lifecycle,
3007         allowing the backend to be cleaned up as soon as a transaction is complete,
3008         rather than waiting for the JS object to get cleaned up.
3009
3010         No new tests, this is a refactor covered by existing tests.
3011
3012         * Modules/indexeddb/IDBDatabase.cpp:
3013         (WebCore::IDBDatabase::transaction):
3014         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3015         (WebCore::IDBDatabaseBackendImpl::commit):
3016         (WebCore::IDBDatabaseBackendImpl::abort):
3017         (WebCore::IDBDatabaseBackendImpl::createTransaction):
3018         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
3019         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
3020         (WebCore::IDBDatabaseCallbacksImpl::onAbort):
3021         (WebCore::IDBDatabaseCallbacksImpl::onComplete):
3022         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3023         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
3024         * Modules/indexeddb/IDBTransaction.cpp:
3025         (WebCore::IDBTransaction::create):
3026         (WebCore::IDBTransaction::IDBTransaction):
3027         (WebCore::IDBTransaction::setActive):
3028         (WebCore::IDBTransaction::abort):
3029         * Modules/indexeddb/IDBTransaction.h:
3030         (WebCore):
3031         (IDBTransaction):
3032         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3033         (WebCore::IDBTransactionBackendImpl::create):
3034         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
3035         (WebCore::IDBTransactionBackendImpl::abort):
3036         (WebCore::IDBTransactionBackendImpl::commit):
3037         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3038         (IDBTransactionBackendImpl):
3039         (WebCore::IDBTransactionBackendImpl::setCallbacks):
3040
3041 2013-01-18  Brady Eidson  <beidson@apple.com>
3042
3043         Rework NetworkProcess resource load identifiers.
3044         <rdar://problem/12934449> and https://bugs.webkit.org/show_bug.cgi?id=107192
3045
3046         Reviewed by Alexey Proskuryakov.
3047
3048         No new tests (No effect in tested configs).
3049
3050         * WebCore.exp.in:
3051
3052         Include an identifier argument for synchronous loads:
3053         * loader/LoaderStrategy.cpp:
3054         (WebCore::LoaderStrategy::loadResourceSynchronously):
3055         * loader/LoaderStrategy.h:
3056
3057         Pass along a unique identifier to the synchronous load:
3058         * loader/FrameLoader.cpp:
3059         (WebCore::FrameLoader::loadResourceSynchronously):
3060
3061         Remove the "setIdentifier" method:
3062         * loader/ResourceLoader.cpp:
3063         * loader/ResourceLoader.h:
3064
3065 2013-01-18  Shinya Kawanaka  <shinyak@chromium.org>
3066
3067         Introduce isHTMLTextFormControlElement and toHTMLTextFormControlElement instead of toTextFormControl
3068         https://bugs.webkit.org/show_bug.cgi?id=107089
3069
3070         Reviewed by Kent Tamura.
3071
3072         toTextFormControl(node) returns 0 if node is not HTMLTextFormControl. In recent coding convention,
3073         we only have ASSERT and statc_cast in this kind of conversion function. So this code looks like
3074         having a bad cast, though it does not.
3075
3076         In this patch, we convert toTextFromControl to isHTMLTextFormControlElement and toHTMLFormControlElement,
3077         which aligns our coding convention.
3078
3079         No new tests, simple refactoring.
3080
3081         * editing/Editor.cpp:
3082         (WebCore::Editor::selectionForCommand):
3083         (WebCore::Editor::setBaseWritingDirection):
3084         * html/HTMLElement.cpp:
3085         (WebCore::HTMLElement::directionality):
3086         * html/HTMLTextFormControlElement.cpp:
3087         (WebCore::enclosingTextFormControl):
3088         * html/HTMLTextFormControlElement.h:
3089         (WebCore::isHTMLTextFormControlElement):
3090         (WebCore):
3091         (WebCore::toHTMLTextFormControlElement):
3092         * rendering/RenderTextControl.cpp:
3093         (WebCore::RenderTextControl::RenderTextControl):
3094         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
3095         * testing/Internals.cpp:
3096         (WebCore::Internals::visiblePlaceholder):
3097
3098 2013-01-18  Emil A Eklund  <eae@chromium.org>
3099
3100         Change RenderStyle::getRoundedInnerBorderFor to take ints for border widths
3101         https://bugs.webkit.org/show_bug.cgi?id=107331
3102
3103         Reviewed by Levi Weintraub.
3104         
3105         Borders are always represented as ints yet RenderStyle::
3106         getRoundedInnerBorderFor upcasts from int to LayoutUnit when
3107         calling getRoundedInnerBorderFor.
3108
3109         No new tests, no change in functionality.
3110
3111         * rendering/style/RenderStyle.cpp:
3112         (WebCore::RenderStyle::getRoundedInnerBorderFor):
3113         * rendering/style/RenderStyle.h:
3114         Change getRoundedInnerBorderFor to use ints for border widths.
3115
3116 2013-01-18  Adam Barth  <abarth@webkit.org>
3117
3118         BackgroundHTMLParser shouldn't create AtomicStrings
3119         https://bugs.webkit.org/show_bug.cgi?id=107150
3120
3121         Reviewed by Tony Gentilcore.
3122
3123         Previously, we were creating an AtomicString from the HTMLToken for
3124         every start and end tag. This caused us to have a static dependency on
3125         the parser thread's atomic string table. We want to avoid static
3126         dependencies because we want to eventually run the background parser
3127         using a library like libdispatch that will let us run many version in
3128         parallel.
3129
3130         This patch uses a different approach whereby we use the tag name from
3131         the CompactHTMLToken. In order to avoid calling strcmp excessively, we
3132         use StringImpl::hash to quickly reject matches with some common tag
3133         names. As a side effect, the hash value will be cached in the
3134         StringImpl, speeding up atomization once these StringImpls arrive on
3135         the main thread.
3136
3137         This patch also improves the performance on html-parser-srcdoc.html.
3138         With the patch in bug 107236 applied (which focuses the benchmark more
3139         tightly on the parser), we spend 2.3% less time on the main thread
3140         (likely due to pre-caching the hash values) and 11.5% less time on the
3141         parser thread.
3142
3143         * html/parser/BackgroundHTMLParser.cpp:
3144         (WebCore):
3145         (WebCore::threadSafeEqual):
3146         (WebCore::threadSafeMatch):
3147         (WebCore::BackgroundHTMLParser::pumpTokenizer):
3148
3149 2013-01-18  Tony Gentilcore  <tonyg@chromium.org>
3150
3151         Run defer scripts in the threaded HTML parser
3152         https://bugs.webkit.org/show_bug.cgi?id=107320
3153
3154         Reviewed by Eric Seidel.
3155
3156         No new tests because covered by http/tests/misc/script-defer.html.
3157
3158         * html/parser/HTMLDocumentParser.cpp:
3159         (WebCore::HTMLDocumentParser::prepareToStopParsing):
3160         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
3161
3162 2013-01-18  Robert Hogan  <robert@webkit.org>
3163
3164         fast/inline/fixed-pos-moves-with-abspos-parent-relative-ancestor.html is crashing after r140024
3165         https://bugs.webkit.org/show_bug.cgi?id=107209
3166
3167         Reviewed by David Hyatt.
3168
3169         * rendering/RenderBlock.cpp:
3170         (WebCore::RenderBlock::layoutPositionedObjects): r140024 forgot to layout the fixedpos object after
3171         marking it.
3172
3173 2013-01-18  Abhishek Arya  <inferno@chromium.org>
3174
3175         Heap-use-after-free in WebCore::RenderObject::isDescendantOf
3176         https://bugs.webkit.org/show_bug.cgi?id=107226
3177
3178         Reviewed by David Hyatt.
3179
3180         Test: fast/block/float/overhanging-float-not-removed-crash.html
3181
3182         * rendering/RenderBox.cpp:
3183         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
3184         Skip anonymous blocks in the chain to get the enclosing block and
3185         be able to correctly mark the overhanging floats in the next siblings.
3186
3187 2013-01-18  Chris Hopman  <cjhopman@google.com>
3188
3189         Fix scrollRectToVisible in the presence of transforms
3190         https://bugs.webkit.org/show_bug.cgi?id=105574
3191
3192         Reviewed by Simon Fraser.
3193
3194         When scrolling to reveal an overflow layer, the required scroll was
3195         being calculated in absolute coordinates. To properly account for
3196         transforms, this calculation should be done in the local coordinates
3197         of the renderBox.
3198
3199         Tests: editing/input/reveal-selection-transformed-overflow-parent.html
3200                editing/input/reveal-selection-transformed-textarea.html
3201
3202         * rendering/RenderLayer.cpp:
3203         (WebCore::RenderLayer::scrollRectToVisible):
3204         When scrolling to reveal an overflow layer, calculate the required
3205         scroll in the local coordinates of the RenderBox.
3206         * rendering/RenderObject.cpp:
3207         (WebCore::RenderObject::absoluteToLocalQuad):
3208         (WebCore):
3209         * rendering/RenderObject.h:
3210         (RenderObject):
3211         Add function to convert an absolute quad to a local quad.
3212
3213 2013-01-18  Julien Chaffraix  <jchaffraix@webkit.org>
3214
3215         [CSS Grid Layout] Add support for min-content
3216         https://bugs.webkit.org/show_bug.cgi?id=106474
3217
3218         Reviewed by Ojan Vafai.
3219
3220         Tests: fast/css-grid-layout/minmax-min-content-column-resolution-columns.html
3221                fast/css-grid-layout/minmax-min-content-column-resolution-rows.html
3222
3223         This change adds support to properly size min-content as long as the grid items and the grid element
3224         don't have orthogonal writing-modes. Orthogonal writing modes will be handled in a follow-up bug
3225         to keep the patch small-ish.
3226
3227         This change implements a subset of the specification's algorithm, taking some shortcuts where the
3228         extra complexity wasn't a clear win for now: e.g. the specification relies on behavior customization
3229         through functors to share code among more complex cases - like spanning columns / rows. These shortcuts
3230         have been marked as FIXME / comments in the code so that they can be evaluated and fixed as we implement
3231         more of the complexity.
3232
3233         * platform/Length.h:
3234         (WebCore::Length::isMinContent):
3235         (WebCore::Length::isMaxContent):
3236         Helper functions.
3237
3238         * rendering/RenderGrid.cpp:
3239         (WebCore::GridTrack::maxBreadthIfNotInfinite):
3240         Helper function that returns the max breadth if finite and the used breadth otherwise.
3241
3242         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
3243         Updated to call resolveContentBasedTrackSizingFunctions.
3244
3245         (WebCore::RenderGrid::computeUsedBreadthOfMinLength):
3246         (WebCore::RenderGrid::computeUsedBreadthOfMaxLength):
3247         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
3248         Split computeUsedBreadthOfLength into min and max side so that we can return the default values accordingly.
3249         computeUsedBreadthOfSpecifiedLength shares the common code. Also made these functions 'const'.
3250
3251         (WebCore::RenderGrid::minContentForChild):
3252         This function returns the 'min-content' value based on layout / compute preferred logical widths information.
3253
3254         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3255         This is the core function that implements the sizing. It currently doesn't share much code between the branches,
3256         which will be done as we implement more of the algorithm.
3257
3258         (WebCore::RenderGrid::distributeSpaceToTracks):
3259         Clamped the growthShare to positive value only. This is required to handle cases where min-content is bigger
3260         than max track breadth. Added a comment about this deviation from the specification.
3261
3262         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
3263         Debug only method. It is a sanity check as our algorithm should *never* shrink the used breadth to a value
3264         smaller than the computed min track breadth.
3265
3266         (WebCore::RenderGrid::layoutGridItems):
3267         Added 2 ASSERT using tracksAreWiderThanMinTrackBreadth.
3268
3269         (WebCore::RenderGrid::resolveGridPosition):
3270         Helper overriden instance.
3271         * rendering/RenderGrid.h:
3272         Added the new functions. Also made more core functions take both grid tracks.
3273
3274 2013-01-18  Geoffrey Garen  <ggaren@apple.com>
3275
3276         Weak GC maps should be easier to use
3277         https://bugs.webkit.org/show_bug.cgi?id=107312
3278
3279         Reviewed by Sam Weinig.
3280
3281         Since weak GC maps are so easy to use now, let's use them for the DOM
3282         string cache.
3283
3284         * WebCore.exp.in:
3285         * bindings/js/DOMWrapperWorld.cpp:
3286         (WebCore):
3287         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
3288         * bindings/js/DOMWrapperWorld.h:
3289         (WebCore):
3290         (WebCore::DOMWrapperWorld::globalData):
3291         (DOMWrapperWorld):
3292         * bindings/js/JSDOMBinding.cpp:
3293         (WebCore):
3294         * bindings/js/JSDOMBinding.h:
3295         (WebCore):
3296         (WebCore::jsStringWithCache):
3297
3298 2013-01-18  Tim Volodine  <timvolodine@chromium.org>
3299
3300         Text Autosizing: don't autosize headers with multiple inline links.
3301         https://bugs.webkit.org/show_bug.cgi?id=106792
3302
3303         Reviewed by Kenneth Rohde Christiansen.
3304
3305         This patch includes code for detecting rows of links typically seen
3306         in headers or footers of webpages. Such rows of links should not be
3307         autosized.
3308
3309         The heuristics to detect such rows of links are based on the appearance
3310         of headers in most websites: i.e. links are inline, there are at least three
3311         of them, they should have the same font size with possibly only short textual
3312         separators between them (max 3 characters) and there should be no line breaks
3313         (i.e. <br> elements) between them.
3314
3315         Tests: fast/text-autosizing/header-li-links-autosizing.html
3316                fast/text-autosizing/header-links-autosizing-different-fontsize.html
3317                fast/text-autosizing/header-links-autosizing.html
3318
3319         * rendering/TextAutosizer.cpp:
3320         (WebCore::TextAutosizer::containerShouldBeAutosized):
3321         (WebCore::TextAutosizer::containerIsRowOfLinks):
3322         (WebCore):
3323         * rendering/TextAutosizer.h:
3324
3325 2013-01-18  Levi Weintraub  <leviw@chromium.org>
3326
3327         LayoutUnit should round half consistently, not away from zero
3328         https://bugs.webkit.org/show_bug.cgi?id=107208
3329
3330         Reviewed by Eric Seidel.
3331
3332         The current implementation of LayoutUnit::round() always rounds half away from zero. This can result in
3333         a shift of 1 pixel moving an element aligned at a half-pixel by 2. This problem is particularly common with
3334         RenderLayers, which pass the sub-pixel accumulation into their renderers after translating the graphics
3335         context passed in by their rounded location. This changes round() to always round 0.5 up.
3336
3337         Test: fast/sub-pixel/sub-pixel-root-layer.html
3338
3339         * platform/LayoutUnit.h:
3340         (WebCore::LayoutUnit::round): Always round 0.5 up.
3341         * rendering/RenderLayer.cpp:
3342         (WebCore::RenderLayer::paintLayerContents): We no longer need to prevent rootLayers from passing in a
3343         sub-pixel offset. This eliminates the shifting of elements when applying translateZ(0) or similar.
3344
3345 2013-01-18  Kentaro Hara  <haraken@chromium.org>
3346
3347         [V8] Remove custom V8ScriptProfileNodeCustom::toV8()
3348         https://bugs.webkit.org/show_bug.cgi?id=107245
3349
3350         Reviewed by Adam Barth.
3351
3352         V8ScriptProfileNodeCustom::toV8() needs not to be custom.
3353         Furthermore, the current custom toV8() is wrong in that
3354         it doesn't use a creationContext and it doesn't set a wrapper
3355         class id. This is one of steps to avoiding ASSERT()s
3356         that will be added in https://bugs.webkit.org/show_bug.cgi?id=107137 .
3357
3358         No tests. No change in behavior.
3359
3360         * UseV8.cmake:
3361         * WebCore.gypi:
3362         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed.
3363         * inspector/ScriptProfileNode.idl:
3364
3365 2013-01-18  Ali Juma  <ajuma@chromium.org>
3366
3367         [chromium] Convert WebTransformOperations into pure virtual
3368         https://bugs.webkit.org/show_bug.cgi?id=105553
3369
3370         Reviewed by James Robinson.
3371
3372         This removes the implementation of WebTransformOperations and updates
3373         users to construct instances using a factory function. This also adds
3374         the implementation of WebTransformKeyFrame.
3375
3376         No new tests, no change in functionality.
3377
3378         * WebCore.gypi:
3379         * platform/chromium/support/WebTransformKeyframe.cpp: Copied from Source/Platform/chromium/public/WebTransformKeyframe.h.
3380         (WebKit):
3381         (WebKit::WebTransformKeyframe::WebTransformKeyframe):
3382         (WebKit::WebTransformKeyframe::~WebTransformKeyframe):
3383         (WebKit::WebTransformKeyframe::time):
3384         (WebKit::WebTransformKeyframe::value):
3385         * platform/chromium/support/WebTransformOperations.cpp: Removed.
3386         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
3387         (WebCore::toWebTransformOperations):
3388         (WebCore::WebTransformAnimationCurve):
3389
3390 2013-01-18  Arko Saha  <arko@motorola.com>
3391
3392         PropertyCollection test fails on JavaScriptCore
3393         https://bugs.webkit.org/show_bug.cgi?id=106997
3394
3395         Reviewed by Kentaro Hara.
3396
3397         Made changes in CodeGeneratorJS.pm so that it can use
3398         toJS(JSC::ExecState*, JSDOMGlobalObject*, PropertyNodeList*)
3399         to wrap the object and return PropertyNodeList instead of NodeList.
3400
3401         Test: fast/dom/MicroData/propertiescollection-crash.html
3402               fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html
3403
3404         * bindings/scripts/CodeGeneratorJS.pm:
3405         (GenerateImplementation):
3406
3407 2013-01-18  Dominic Mazzoni  <dmazzoni@google.com>
3408
3409         AX: Improve table-guessing heuristics
3410         https://bugs.webkit.org/show_bug.cgi?id=107042
3411
3412         Reviewed by Chris Fleizach.
3413
3414         Adds some more rules so that tables with cell borders, empty-cells,
3415         col, colgroup, or >= 20 rows are all considered data tables, not
3416         layout tables.
3417
3418         Test: accessibility/table-detection.html (modified)
3419
3420         * accessibility/AccessibilityTable.cpp:
3421         (WebCore::AccessibilityTable::isDataTable):
3422
3423 2013-01-18  Terry Anderson  <tdanderson@chromium.org>
3424
3425         Scroll gestures should not create wheel events
3426         https://bugs.webkit.org/show_bug.cgi?id=103952
3427
3428         Reviewed by James Robinson.
3429
3430         Tests: fast/events/touch/gesture/touch-gesture-scroll-div-propagated.html
3431                fast/events/touch/gesture/touch-gesture-scroll-div-twice-propagated.html
3432                fast/events/touch/gesture/touch-gesture-scroll-iframe-editable.html
3433                fast/events/touch/gesture/touch-gesture-scroll-iframe-propagated.html
3434                fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html
3435
3436         In EventHandler::handleGestureEvent(), scroll gestures should not be handled by synthesizing
3437         and dispatching wheel events; we should instead scroll the relevant layer directly.
3438
3439         Note that this patch should be landed together with the patch for
3440         https://bugs.webkit.org/show_bug.cgi?id=106589.
3441
3442         * page/EventHandler.cpp:
3443         (WebCore::EventHandler::EventHandler):
3444         (WebCore::EventHandler::clear):
3445         (WebCore::EventHandler::handleGestureEvent):
3446         (WebCore::EventHandler::passGestureEventToWidget):
3447         (WebCore::EventHandler::passGestureEventToWidgetIfPossible):