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