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