0806dbd33c84e369bd2175bdc73e9d0abf55d46c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-14  Florin Malita  <fmalita@chromium.org>
2
3         [SVG] Cached filter results are not invalidated on repaint rect change
4         https://bugs.webkit.org/show_bug.cgi?id=106221
5
6         Reviewed by Dean Jackson.
7
8         Since the cached filter results are not invalidated for different repaint rects, we need
9         to render the content of the whole filter region upfront (otherwise elements not visible
10         during the initial paint due to scrolling/window size/etc. are never redrawn).
11
12         Tests: svg/filters/filter-hidden-content-expected.svg
13                svg/filters/filter-hidden-content.svg
14
15         * rendering/svg/RenderSVGResourceFilter.cpp:
16         (WebCore::RenderSVGResourceFilter::applyResource):
17         (WebCore::RenderSVGResourceFilter::drawingRegion):
18         (WebCore):
19         * rendering/svg/RenderSVGResourceFilter.h:
20         (FilterData):
21         (RenderSVGResourceFilter):
22         Track the filter drawing region in FilterData.
23
24         * rendering/svg/SVGRenderingContext.cpp:
25         (WebCore::SVGRenderingContext::~SVGRenderingContext):
26         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
27         * rendering/svg/SVGRenderingContext.h:
28         Update paintInfo.rect to cover the whole drawing region while rendering filter content, and
29         restore it when done.
30
31 2013-02-14  Jinwoo Song  <jinwoo7.song@samsung.com>
32
33         [EFL] Correct the mismatched cursor map
34         https://bugs.webkit.org/show_bug.cgi?id=109655
35
36         Reviewed by Laszlo Gombos.
37
38         Correct the mismatched ECORE_X_CURSOR values in the cursor map.
39
40         * platform/efl/EflScreenUtilities.cpp:
41         (WebCore::CursorMap::CursorMap):
42
43 2013-02-14  Kentaro Hara  <haraken@chromium.org>
44
45         Unreviewed. Rebaselined run-bindings-tests.
46
47         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
48         (WebDOMTestObj::anyAttribute):
49         (WebDOMTestObj::setAnyAttribute):
50         * bindings/scripts/test/CPP/WebDOMTestObj.h:
51         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
52         (webkit_dom_test_obj_get_any_attribute):
53         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
54         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
55         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
56         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
57
58 2013-02-14  Christian Biesinger  <cbiesinger@chromium.org>
59
60         Convert media controls from DeprecatedFlexibleBox to FlexibleBox
61         https://bugs.webkit.org/show_bug.cgi?id=109775
62
63         Reviewed by Ojan Vafai.
64
65         Covered by existing tests in media/.
66
67         * css/mediaControls.css:
68         * css/mediaControlsBlackBerry.css:
69         * css/mediaControlsChromium.css:
70         * css/mediaControlsChromiumAndroid.css:
71         * css/mediaControlsEfl.css:
72         * css/mediaControlsGtk.css:
73         * css/mediaControlsQt.css:
74         * css/mediaControlsQuickTime.css:
75         Automated search and replace of old flexbox CSS rules to new ones.
76         Minor tuning of the chromium rules.
77
78         * rendering/RenderMediaControlElements.cpp:
79         (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
80         (WebCore::RenderMediaControlTimeDisplay::layout):
81         * rendering/RenderMediaControlElements.h:
82         Make media controls inherit from RenderFlexibleBox
83
84 2013-02-14  Roger Fong  <roger_fong@apple.com>
85
86         Build fix for Windows.
87
88         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
89         (WebCore::nameForSQLTransactionState):
90
91 2013-02-14  Dean Jackson  <dino@apple.com>
92
93         Inspector doesn't show rules from pluginsStyleSheet
94         https://bugs.webkit.org/show_bug.cgi?id=109872
95
96         Reviewed by Darin Adler.
97
98         Make sure getWrapperForRuleInSheets collects the rules
99         from CSSDefaultStyleSheets::plugInsStyleSheet.
100
101         Making a test for this is difficult because the rules in
102         this sheet only apply to snapshotted plugins at the moment,
103         which are disabled in DRT, and would require a fairly long
104         timeout in the test.
105
106         * css/InspectorCSSOMWrappers.cpp:
107         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
108
109 2013-02-14  Hayato Ito  <hayato@chromium.org>
110
111         Recover edge names used in MemoryInstrumentation for DocumentRuleSets.
112         https://bugs.webkit.org/show_bug.cgi?id=109800
113
114         Reviewed by Hajime Morita.
115
116         This is a following patch for r142573.
117         r142563 accidentally removes edge names for MemoryInstrumentation. We should recover edge names.
118
119         No tests. No change in behavior.
120
121         * css/DocumentRuleSets.cpp:
122         (WebCore::DocumentRuleSets::reportMemoryUsage):
123
124 2013-02-14  Hajime Morrita  <morrita@google.com>
125
126         [V8] Assertion failure on an exception is thrown
127         https://bugs.webkit.org/show_bug.cgi?id=109129
128
129         An assertion in V8AbstractEventListener is wrong. This change turns it into an error check.
130
131         Reviewed by Kentaro Hara.
132
133         Test: fast/events/onerror-no-constructor.html
134
135         * bindings/v8/V8AbstractEventListener.cpp:
136         (WebCore::V8AbstractEventListener::handleEvent):
137
138 2013-02-14  Kentaro Hara  <haraken@chromium.org>
139
140         [V8] CodeGeneratorV8.pm can assume that DOMWindow has [CheckSecurity]
141         https://bugs.webkit.org/show_bug.cgi?id=109788
142
143         Reviewed by Adam Barth.
144
145         There is code like this:
146
147           if ($extendedAttr{"CheckSecurity"} || $interfaceName eq "DOMWindow")
148
149         This check is redundant. DOMWindow has [CheckSecurity]. We can remove the
150         DOMWindow check.
151
152         No tests. No change in behavior.
153
154         * bindings/scripts/CodeGeneratorV8.pm:
155         (GenerateReplaceableAttrSetter):
156         (GenerateFunctionCallback):
157         (GenerateNonStandardFunction):
158         (GenerateImplementation):
159
160 2013-02-14  Joshua Bell  <jsbell@chromium.org>
161
162         [V8] IndexedDB: Remove unused creationContext paramter from idbKeyToV8Value
163         https://bugs.webkit.org/show_bug.cgi?id=109870
164
165         Reviewed by Kentaro Hara.
166
167         This parameter was left over from when the function was toV8(IDBKey). Remove it.
168
169         No new tests - just removing dead code.
170
171         * bindings/v8/IDBBindingUtilities.cpp:
172         (WebCore::idbKeyToV8Value): Remove unused parameter.
173         (WebCore::injectIDBKeyIntoScriptValue): No need for dummy handle.
174         (WebCore::idbKeyToScriptValue): No need for dummy handle.
175
176 2013-02-14  Kondapally Kalyan  <kalyan.kondapally@intel.com>
177
178         [WebGL][Qt] regression:r142786 Qt Build fix for Arm and Windows.
179         https://bugs.webkit.org/show_bug.cgi?id=109797
180
181         Reviewed by Csaba Osztrogon√°c.
182
183         After r142786, we use OpenGLShims to load necessary GL functions
184         exposed by ARB_vertex_array_object extension. Qt uses OpenGLShims
185         to load functions with GLES too. This patch adds support for loading the
186         equivalent functions on GLES exposed by OES_vertex_array_object.
187         
188         * platform/graphics/OpenGLShims.cpp:
189         (WebCore::initializeOpenGLShims):
190         * platform/graphics/OpenGLShims.h:
191
192 2013-02-14  Alexey Proskuryakov  <ap@apple.com>
193
194         <rdar://problem/13210723> CORS preflight broken with NetworkProcess
195         https://bugs.webkit.org/show_bug.cgi?id=109753
196
197         Reviewed by Brady Eidson.
198
199         * loader/DocumentThreadableLoader.h:
200         * loader/DocumentThreadableLoader.cpp:
201         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
202         (WebCore::DocumentThreadableLoader::cancel):
203         (WebCore::DocumentThreadableLoader::didReceiveResponse):
204         (WebCore::DocumentThreadableLoader::dataReceived):
205         (WebCore::DocumentThreadableLoader::didReceiveData):
206         (WebCore::DocumentThreadableLoader::notifyFinished):
207         (WebCore::DocumentThreadableLoader::didFinishLoading):
208         (WebCore::DocumentThreadableLoader::didFail):
209         (WebCore::DocumentThreadableLoader::preflightFailure): Notify InspectorInstrumentation
210         immediately. In addition to keeping up eith other changes, this means that an accurate
211         error will be passed now, not a cancellation.
212         (WebCore::DocumentThreadableLoader::loadRequest):
213         Get rid of m_preflightRequestIdentifier. Every loader has an identifier, and tracking
214         identifiers twice is wrong.
215         Pass identifier explicitly to more internal functions, so that they would not have to
216         second-guess callers.
217
218         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest):
219         Create an identifier for all loaders, not just those that we expect to have client
220         callbacks about. Both Inspector and NetworkProcess need identifiers everywhere.
221
222         * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::deprecatedDidReceiveCachedResource):
223         * loader/TextTrackLoader.h:
224         * loader/cache/CachedResourceClient.h:
225         (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):
226         * loader/cache/CachedTextTrack.cpp: (WebCore::CachedTextTrack::data):
227         Renamed didReceiveData to avoid conflict with the new DocumentThreadableLoader::didReceiveData.
228         And we should really get rid of this CachedResourceClient function anyway.
229
230 2013-02-14  Kentaro Hara  <haraken@chromium.org>
231
232         Replace 'DOMObject' with 'any'
233         https://bugs.webkit.org/show_bug.cgi?id=109793
234
235         Reviewed by Dimitri Glazkov.
236
237         In the Web IDL spec, there is no type named 'DOMObject'.
238         It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's.
239
240         * Modules/webdatabase/SQLResultSetRowList.idl:
241         * bindings/scripts/CodeGeneratorCPP.pm:
242         (GetClassName):
243         (AddIncludesForType):
244         * bindings/scripts/CodeGeneratorGObject.pm:
245         (GenerateFunction):
246         * bindings/scripts/CodeGeneratorJS.pm:
247         (AddIncludesForType):
248         (GenerateImplementation):
249         (JSValueToNative):
250         (NativeToJSValue):
251         * bindings/scripts/CodeGeneratorV8.pm:
252         (GetNativeType):
253         (JSValueToNative):
254         (GetV8HeaderName):
255         * dom/CustomEvent.idl:
256         * dom/MessageEvent.idl:
257         * dom/PopStateEvent.idl:
258         * fileapi/FileReader.idl:
259         * html/HTMLCanvasElement.idl:
260         * html/HTMLElement.idl:
261         * html/canvas/DataView.idl:
262         * inspector/InjectedScriptHost.idl:
263         * inspector/InspectorFrontendHost.idl:
264         * inspector/JavaScriptCallFrame.idl:
265         * page/DOMWindow.idl:
266         * page/Location.idl:
267
268 2013-02-14  Kentaro Hara  <haraken@chromium.org>
269
270         [V8] Remove GenerateEventListenerCallback() from CodeGeneratorV8.pm
271         https://bugs.webkit.org/show_bug.cgi?id=109786
272
273         Reviewed by Adam Barth.
274
275         Some code is duplicated between GenerateEventListenerCallback()
276         and GenerateFunctionCallback(). By inlining GenerateEventListenerCallback()
277         into GenerateFunctionCallback(), we can remove the duplication.
278
279         No tests. No change in behavior.
280
281         * bindings/scripts/CodeGeneratorV8.pm:
282         (GenerateFunctionCallback):
283
284 2013-02-14  Ojan Vafai  <ojan@chromium.org>
285
286         Intrinsic and preferred widths on replaced elements are wrong in many cases
287         https://bugs.webkit.org/show_bug.cgi?id=109859
288
289         Reviewed by Levi Weintraub.
290
291         Test: fast/replaced/preferred-widths.html
292
293         * rendering/RenderReplaced.cpp:
294         (WebCore::RenderReplaced::computeIntrinsicLogicalWidths):
295         Separate out computing the intrinsic widths. Eventually,
296         we should be able to share computePreferredLogicalWidth implementations
297         for all replaced elements and form controls since only the intrinsic width
298         changes.
299
300         (WebCore::RenderReplaced::computePreferredLogicalWidths):
301         -Apply min-width and max-width constraints and then add borderAndPaddingLogicalWidth
302         at the end to make sure it's always applied. This matches all our other
303         computePreferredLogicalWidths override and makes use match Gecko's/Opera's rendering.
304         -Only set the minPreferredLogicalWidth to 0 if the width or max-width is a percent value.
305         Doing it for height values and for min-width doesn't make any sense and doesn't
306         match other browsers. Doing this for max-width still doesn't match other browsers,
307         but it sounds like Gecko at least would like to change that.
308
309         * rendering/RenderReplaced.h:
310         (WebCore::RenderReplaced::hasRelativeIntrinsicLogicalWidth):
311         * rendering/svg/RenderSVGRoot.cpp:
312         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
313         Add a way to check if the logicalWidth is relative so that we only check
314         the width in computePreferredLogicalWidths instead of also checking the height.
315
316         * rendering/svg/RenderSVGRoot.h:
317
318 2013-02-14  Stephen Chenney  <schenney@chromium.org>
319
320         Crash when selecting a HarfBuzz text run with SVG fonts included
321         https://bugs.webkit.org/show_bug.cgi?id=109833
322
323         Reviewed by Tony Chang.
324
325         There is an assert in SimpleFontData::applyTransforms that should not
326         be there, as the code is valid for SVG fonts. If we get past this,
327         then the HarfBuzz text run shaping code assumes that font data has a
328         SkTypeface member, and SVG fonts do not. So we crash there too.
329
330         For now, we fix the crashes. This still leaves incorrect selection
331         rectangles in this situation, on all platforms, tracked in
332         https://bugs.webkit.org/show_bug.cgi?id=108133
333
334         Test: svg/css/font-face-crash.html
335
336         * platform/graphics/SimpleFontData.h:
337         (WebCore::SimpleFontData::applyTransforms): Remove ASSERT_NOT_REACHED as the code can legally be reached for SVG fonts.
338         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
339         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Check for SVG fonts in the text run, and abort if we find them.
340
341 2013-02-13 Joe Mason <jmason@rim.com>
342
343         [BlackBerry] Notify platform layer of failing to get authentication credentials
344         https://bugs.webkit.org/show_bug.cgi?id=109751
345
346         Reviewed by Yong Li.
347         Reviewed internally by Leo Yang
348         Internal PR: 181302
349
350         The BlackBerry platform network layer needs to know if a stream failed to get authentication credentials.
351         This patch is using newly added stream API to do it.
352
353         No functionality changed no new tests.
354
355         * platform/network/blackberry/NetworkJob.cpp:
356         (WebCore::NetworkJob::notifyAuthReceived):
357         (WebCore::NetworkJob::sendRequestWithCredentials):
358         (WebCore::NetworkJob::notifyChallengeResult):
359         * platform/network/blackberry/NetworkJob.h:
360         * platform/network/blackberry/NetworkManager.cpp:
361         (WebCore::protectionSpaceToPlatformAuth):
362         (WebCore):
363         (WebCore::setAuthCredentials):
364         * platform/network/blackberry/NetworkManager.h:
365         (WebCore):
366
367 2013-02-14  Kondapally Kalyan  <kalyan.kondapally@intel.com>
368
369         [GTK] Fix indentation in GNUmakefile.list.am.
370         https://bugs.webkit.org/show_bug.cgi?id=109854
371
372         Reviewed by Martin Robinson.
373
374         This patch fixes indentation in GNUmakefile.list.am.
375
376         * GNUmakefile.list.am:
377
378 2013-02-14  Tony Chang  <tony@chromium.org>
379
380         Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
381         https://bugs.webkit.org/show_bug.cgi?id=96934
382
383         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
384         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
385
386 2013-02-14  Abhishek Arya  <inferno@chromium.org>
387
388         Bad cast in RenderBlock::splitBlocks.
389         https://bugs.webkit.org/show_bug.cgi?id=108691
390
391         Reviewed by Levi Weintraub.
392
393         Test: fast/multicol/remove-child-split-flow-crash.html
394
395         * rendering/RenderBlock.cpp:
396         (WebCore):
397         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): rename gIsInColumnFlowSplit to gColumnFlowSplitEnabled
398         and use it to decide when to do the column flow split or not.
399         (WebCore::RenderBlock::removeChild): Do not allow column flow split inside removeChild
400         since we might be merging anonymous blocks.
401
402 2013-02-14  Mark Lam  <mark.lam@apple.com>
403
404         Split SQLTransaction work between the frontend and backend.
405         https://bugs.webkit.org/show_bug.cgi?id=104750.
406
407         Reviewed by Sam Weinig.
408
409         This is part of the webdatabase refactoring for webkit2.
410
411         1. Changed how transactions are created.
412
413            - Database::runTransaction() first creates a SQLTransaction frontend
414              which encapsulates the 3 script callbacks. It then passes the
415              SQLTransaction to the backend database to create the
416              SQLTransactionBackend.
417            - The SQLTransactionBackend manages all SQLiteTransaction work.
418
419         2. Introduced SQLTransactionState and SQLTransactionStateMachine.
420
421            - Instead of tracking the transaction phases as "steps" in m_nextStep,
422              we now use m_nextState which is of enum class SQLTransactionState.
423              Unlike m_nextStep which is a pointer to a "step" function,
424              m_nextState is a state variable which is used to index into a
425              state dispatch table.
426
427            - Both SQLTransaction and SQLTransactionBackend now extends
428              SQLTransactionStateMachine, and uses its dispatch mechanism based on
429              the SQLTransactionState.
430
431            - Instead of having 1 state machine instances, there are 2: 1 in the
432              frontend, and 1 in the backend. The 2 have mirrored states, and
433              transfers work to the other state machine when needed.
434
435            - Previously, state functions can be called inline from other states.
436              They are now only called from the state machines runStateMachine()
437              method. This makes it possible to isolate the state transition
438              mechanism going between the sides (frontend and backend) to 2
439              functions only: SQLTransaction::sendToBackendState() and
440              SQLTransactionBackend::sendToFrontendState().
441
442         3. Consolidated cleanup work (mostly) to a unified cleanup function.
443
444         4. Changed the frontend Database::runTransaction() to use a
445            ChangeVersionData* (instead of a ChangeVersionWrapper ref ptr).
446
447            - This is necessary because ChangeVersionWrapper contains functionality
448              used in processing a transaction (to be invoked in the backend).
449              Instead, what we want is to simply pass the 2 old and new version
450              strings to the backend. The new ChangeVersionData simply packages up
451              these 2 strings.
452            - This makes ChangeVersionData easy to serialize for IPC messaging later.
453
454         5. Moved some transaction functions back to the frontend SQLTransaction
455            because they belong there.
456
457         6. Moved some Database functions to its DatabaseBackendAsync backend
458            now that the transaction has been split up.
459
460            - This is driven naturally by those functions being used exclusively
461              in the backend for transaction work.
462            - SQLTransactionClient, SQLTransactionCoordinator, and
463              SQLTransactionWrapper are now exclusively backend data structures.
464              SQLTransactionClient still has some frontend "pollution" that I'll
465              fix later.
466
467         7. Made the few database report functions used only by Chromium conditional
468            on PLATFORM(chromium).
469
470            - The report functions gets re-routed to Chromium's DatabaseObserver
471              which further routes them elsewhere. It is unclear how Chromium uses
472              these routed messages, and I am therefore not able to determine how
473              they should work in a frontend/backend world. So, I'm #ifdef'ing
474              them out. They still work like in the old way for Chromium.
475
476         8. Added new files to the build / project files.
477
478         9. Updated / added comments about how the transaction and its states work.
479
480         No new tests.
481
482         * CMakeLists.txt:
483         * GNUmakefile.list.am:
484         * Modules/webdatabase/AbstractDatabaseServer.h:
485         * Modules/webdatabase/ChangeVersionData.h: Added.
486         (ChangeVersionData):
487         (WebCore::ChangeVersionData::ChangeVersionData):
488         (WebCore::ChangeVersionData::oldVersion):
489         (WebCore::ChangeVersionData::newVersion):
490         * Modules/webdatabase/ChangeVersionWrapper.cpp:
491         (WebCore::ChangeVersionWrapper::performPreflight):
492         (WebCore::ChangeVersionWrapper::performPostflight):
493         (WebCore::ChangeVersionWrapper::handleCommitFailedAfterPostflight):
494         * Modules/webdatabase/ChangeVersionWrapper.h:
495         (ChangeVersionWrapper):
496         * Modules/webdatabase/Database.cpp:
497         (WebCore::Database::Database):
498         (WebCore::Database::close):
499         (WebCore::Database::changeVersion):
500         (WebCore::Database::transaction):
501         (WebCore::Database::readTransaction):
502         (WebCore::Database::runTransaction):
503         (WebCore::Database::reportStartTransactionResult):
504         (WebCore::Database::reportCommitTransactionResult):
505         (WebCore::Database::reportExecuteStatementResult):
506         * Modules/webdatabase/Database.h:
507         (WebCore::Database::databaseContext):
508         (Database):
509         (WebCore::Database::reportStartTransactionResult):
510         (WebCore::Database::reportCommitTransactionResult):
511         (WebCore::Database::reportExecuteStatementResult):
512         * Modules/webdatabase/DatabaseBackend.cpp:
513         * Modules/webdatabase/DatabaseBackend.h:
514         (DatabaseBackend):
515         (WebCore::DatabaseBackend::reportOpenDatabaseResult):
516         (WebCore::DatabaseBackend::reportChangeVersionResult):
517         (WebCore::DatabaseBackend::reportStartTransactionResult):
518         (WebCore::DatabaseBackend::reportCommitTransactionResult):
519         (WebCore::DatabaseBackend::reportExecuteStatementResult):
520         (WebCore::DatabaseBackend::reportVacuumDatabaseResult):
521         * Modules/webdatabase/DatabaseBackendAsync.cpp:
522         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
523         (WebCore::DatabaseBackendAsync::runTransaction):
524         (WebCore::DatabaseBackendAsync::inProgressTransactionCompleted): Moved from frontend.
525         (WebCore::DatabaseBackendAsync::scheduleTransaction): Moved from frontend.
526         (WebCore::DatabaseBackendAsync::scheduleTransactionStep): Moved from frontend.
527         (WebCore::DatabaseBackendAsync::transactionClient): Moved from frontend.
528         (WebCore::DatabaseBackendAsync::transactionCoordinator): Moved from frontend.
529         * Modules/webdatabase/DatabaseBackendAsync.h:
530         (DatabaseBackendAsync):
531         * Modules/webdatabase/DatabaseBackendContext.cpp:
532         (WebCore::DatabaseBackendContext::frontend):
533         * Modules/webdatabase/DatabaseBackendContext.h:
534         (DatabaseBackendContext):
535         * Modules/webdatabase/DatabaseManager.cpp:
536         * Modules/webdatabase/DatabaseManager.h:
537         (DatabaseManager):
538         * Modules/webdatabase/DatabaseServer.cpp:
539         * Modules/webdatabase/DatabaseServer.h:
540         * Modules/webdatabase/DatabaseTask.cpp:
541         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
542         * Modules/webdatabase/SQLTransaction.cpp:
543         (WebCore::SQLTransaction::create):
544         (WebCore::SQLTransaction::SQLTransaction):
545         (WebCore::SQLTransaction::setBackend):
546         (WebCore::SQLTransaction::stateFunctionFor):
547         (WebCore::SQLTransaction::requestTransitToState):
548         (WebCore::SQLTransaction::nextStateForTransactionError):
549             - was handleTransactionError(). There's also a backend version.
550         (WebCore::SQLTransaction::deliverTransactionCallback): Moved from backend.
551         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Moved from backend.
552         (WebCore::SQLTransaction::deliverStatementCallback): Moved from backend.
553         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Moved from backend.
554         (WebCore::SQLTransaction::deliverSuccessCallback): Moved from backend.
555         (WebCore::SQLTransaction::unreachableState):
556         (WebCore::SQLTransaction::sendToBackendState):
557         (WebCore::SQLTransaction::performPendingCallback): Moved from backend.
558         (WebCore::SQLTransaction::executeSQL): Moved from backend.
559         (WebCore::SQLTransaction::checkAndHandleClosedOrInterruptedDatabase):
560         (WebCore::SQLTransaction::clearCallbackWrappers):
561         * Modules/webdatabase/SQLTransaction.h:
562         (SQLTransaction):
563         (WebCore::SQLTransaction::database):
564         (WebCore::SQLTransaction::hasCallback):
565         (WebCore::SQLTransaction::hasSuccessCallback):
566         (WebCore::SQLTransaction::hasErrorCallback):
567         * Modules/webdatabase/SQLTransactionBackend.cpp:
568         (WebCore::SQLTransactionBackend::create):
569         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
570         (WebCore::SQLTransactionBackend::doCleanup):
571         (WebCore::SQLTransactionBackend::transactionError):
572         (WebCore::SQLTransactionBackend::setShouldRetryCurrentStatement):
573         (WebCore::SQLTransactionBackend::stateFunctionFor):
574         (WebCore::SQLTransactionBackend::enqueueStatement):
575         (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase):
576         (WebCore::SQLTransactionBackend::performNextStep):
577         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
578         (WebCore::SQLTransactionBackend::acquireLock):
579         (WebCore::SQLTransactionBackend::lockAcquired):
580         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
581         (WebCore::SQLTransactionBackend::runStatements):
582         (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState):
583             - was runCurrentStatement().
584         (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError):
585             - was handleCurrentStatementError().
586         (WebCore::SQLTransactionBackend::postflightAndCommit):
587         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
588         (WebCore::SQLTransactionBackend::nextStateForTransactionError):
589             - was handleTransactionError(). There's also a frontend version.
590         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
591         (WebCore::SQLTransactionBackend::requestTransitToState):
592         (WebCore::SQLTransactionBackend::unreachableState):
593         (WebCore::SQLTransactionBackend::sendToFrontendState):
594         * Modules/webdatabase/SQLTransactionBackend.h:
595         (SQLTransactionWrapper):
596         (SQLTransactionBackend):
597         (WebCore::SQLTransactionBackend::database):
598         * Modules/webdatabase/SQLTransactionClient.cpp:
599         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
600         (WebCore::SQLTransactionClient::didExecuteStatement):
601         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
602         (WebCore::getDatabaseIdentifier):
603         * Modules/webdatabase/SQLTransactionState.h: Added.
604         * Modules/webdatabase/SQLTransactionStateMachine.cpp: Added.
605         (WebCore::nameForSQLTransactionState):
606             - was debugStepName().
607         * Modules/webdatabase/SQLTransactionStateMachine.h: Added.
608         (SQLTransactionStateMachine):
609         (WebCore::SQLTransactionStateMachine::~SQLTransactionStateMachine):
610         (WebCore::::SQLTransactionStateMachine):
611         (WebCore::::setStateToRequestedState):
612         (WebCore::::runStateMachine):
613         * Target.pri:
614         * WebCore.gypi:
615         * WebCore.vcproj/WebCore.vcproj:
616         * WebCore.vcxproj/WebCore.vcxproj:
617         * WebCore.vcxproj/WebCore.vcxproj.filters:
618         * WebCore.xcodeproj/project.pbxproj:
619         * inspector/InspectorDatabaseAgent.cpp:
620
621 2013-02-14  Jer Noble  <jer.noble@apple.com>
622
623         EME: replace MediaKeySession.addKey() -> update()
624         https://bugs.webkit.org/show_bug.cgi?id=109461
625
626         Reviewed by Eric Carlson.
627
628         No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html test.
629
630         In the latest draft of the Encrypted Media Spec, the addKeys() method has been replaced
631         with update().
632
633         * Modules/encryptedmedia/CDM.h:
634         * Modules/encryptedmedia/MediaKeySession.cpp:
635         (WebCore::MediaKeySession::update):
636         (WebCore::MediaKeySession::addKeyTimerFired):
637         * Modules/encryptedmedia/MediaKeySession.h:
638         * Modules/encryptedmedia/MediaKeySession.idl:
639         * html/HTMLMediaElement.cpp:
640         (WebCore::HTMLMediaElement::webkitAddKey):
641         * testing/MockCDM.cpp:
642         (WebCore::MockCDMSession::update):
643
644 2013-02-14  Tony Chang  <tony@chromium.org>
645
646         Unreviewed, set svn:eol-style CRLF for .sln files.
647
648         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
649         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
650
651 2013-02-14  Eric Carlson  <eric.carlson@apple.com>
652
653         [Mac] adjust caption color user preference calculation
654         https://bugs.webkit.org/show_bug.cgi?id=109840
655
656         Reviewed by Dean Jackson.
657
658         No new tests, it isn't possible to test this with DRT.
659
660         * page/CaptionUserPreferencesMac.mm:
661         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): The color is "important" if either the
662             color or opacity are supposed to override.
663         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Ditto.
664         (WebCore::CaptionUserPreferencesMac::captionsTextColor): Ditto.
665
666         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
667         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
668
669 2013-02-14  Cosmin Truta  <ctruta@rim.com>
670
671         Numeric identifiers of events are not guaranteed to be unique
672         https://bugs.webkit.org/show_bug.cgi?id=103259
673
674         Reviewed by Alexey Proskuryakov.
675
676         The results of setTimeout, setInterval and navigator.geolocation.watchPosition
677         are positive integer values extracted from a simple circular sequential number
678         generator, whose uniqueness can be guaranteed for no more than 2^31 calls to
679         any of these functions. In order to provide this guarantee beyond this limit,
680         we repeatedly ask for the next sequential id until we get one that's not used
681         already.
682
683         This solution works instantly under normal circumstances, when there are few
684         live timeout ids or geolocation ids at any given moment. Handling millions of
685         live ids will require another solution.
686
687         No new tests. Brief tests of uniqueness already exist.
688         Moreover, reproducing this particular issue would require 2^31 set/clear
689         function calls, which is prohibitively expensive.
690
691         * Modules/geolocation/Geolocation.cpp:
692         (WebCore::Geolocation::Watchers::add): Rename from Watchers::set; return false if watch id already exists.
693         (WebCore::Geolocation::watchPosition): Repeat until the new watch id is unique.
694         * Modules/geolocation/Geolocation.h:
695         (Watchers): Rename Watchers::set to Watchers::add.
696         * Modules/geolocation/Geolocation.idl: Rename the argument of Geolocation::clearWatch to WatchID.
697         * dom/ScriptExecutionContext.cpp:
698         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Update initialization.
699         (WebCore::ScriptExecutionContext::circularSequentialID): Rename from newUniqueID; remove FIXME note.
700         * dom/ScriptExecutionContext.h:
701         (ScriptExecutionContext): Rename ScriptExecutionContext::newUniqueID to ScriptExecutionContext::circularSequentialID.
702         (WebCore::ScriptExecutionContext::addTimeout): Return false (do not assert) if timeout id already exists.
703         * page/DOMTimer.cpp:
704         (WebCore::DOMTimer::DOMTimer): Repeat until the new timeout id is unique.
705
706 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
707
708         Unreviewed, rolling out r142825.
709         http://trac.webkit.org/changeset/142825
710         https://bugs.webkit.org/show_bug.cgi?id=109856
711
712         Causes some inspector tests to time out (Requested by anttik
713         on #webkit).
714
715         * platform/mac/SharedTimerMac.mm:
716         (WebCore):
717         (WebCore::PowerObserver::restartSharedTimer):
718         (WebCore::setSharedTimerFireInterval):
719         (WebCore::stopSharedTimer):
720
721 2013-02-14  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
722
723         Support the ch unit from css3-values
724         https://bugs.webkit.org/show_bug.cgi?id=85755
725
726         Reviewed by David Hyatt.
727
728         Original patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>.
729
730         Test: fast/css/css3-ch-unit.html
731
732         * css/CSSCalculationValue.cpp:
733         (WebCore::unitCategory):
734         * css/CSSGrammar.y.in:
735         * css/CSSParser.cpp:
736         (WebCore::CSSParser::validUnit):
737         (WebCore::CSSParser::createPrimitiveNumericValue):
738         (WebCore::CSSParser::parseValidPrimitive):
739         (WebCore::CSSParser::detectNumberToken):
740         * css/CSSParserValues.cpp:
741         (WebCore::CSSParserValue::createCSSValue):
742         * css/CSSPrimitiveValue.cpp:
743         (WebCore::isValidCSSUnitTypeForDoubleConversion):
744         (WebCore::CSSPrimitiveValue::cleanup):
745         (WebCore::CSSPrimitiveValue::computeLengthDouble):
746         (WebCore::CSSPrimitiveValue::customCssText):
747         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
748         * css/CSSPrimitiveValue.h:
749         (WebCore::CSSPrimitiveValue::isFontRelativeLength):
750         (WebCore::CSSPrimitiveValue::isLength):
751         * platform/graphics/FontMetrics.h:
752         (WebCore::FontMetrics::FontMetrics):
753         (WebCore::FontMetrics::zeroWidth):
754         (WebCore::FontMetrics::setZeroWidth):
755         (FontMetrics):
756         (WebCore::FontMetrics::hasZeroWidth):
757         (WebCore::FontMetrics::setHasZeroWidth):
758         * platform/graphics/SimpleFontData.cpp:
759         (WebCore::SimpleFontData::platformGlyphInit):
760         * platform/graphics/SimpleFontData.h:
761         (WebCore::SimpleFontData::zeroGlyph):
762         (WebCore::SimpleFontData::setZeroGlyph):
763         (SimpleFontData):
764         * platform/graphics/qt/SimpleFontDataQt.cpp:
765         (WebCore::SimpleFontData::platformInit):
766
767 2013-02-14  David Kilzer  <ddkilzer@apple.com>
768
769         [Mac] Clean up WARNING_CFLAGS
770         <http://webkit.org/b/109747>
771         <rdar://problem/13208373>
772
773         Reviewed by Mark Rowe.
774
775         * Configurations/Base.xcconfig: Use
776         GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
777         -Wshorten-64-to-32 rather than WARNING_CFLAGS.
778
779 2013-02-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
780
781         Add addHTTPHeaderField() method to ResourceResponse
782         https://bugs.webkit.org/show_bug.cgi?id=109844
783
784         Reviewed by Adam Barth.
785
786         ResourceRequestBase provides both setHTTPHeaderField() and addHTTPHeaderField(). However,
787         ResourceResponseBase only provides setHTTPHeaderField(). This is a bit inconsistent. As a
788         result, the addHTTPHeaderField() functionality's implementation is duplicated in several
789         ports (at least chromium and soup).
790
791         This patch introduces addHTTPHeaderField() to ResourceResponseBase and makes use of it
792         in Chromium and Soup backends.
793
794         No new tests, no behavior change.
795
796         * platform/chromium/support/WebURLResponse.cpp:
797         (WebKit::WebURLResponse::addHTTPHeaderField): Use ResourceResponseBase::addHTTPHeaderField().
798         * platform/network/ResourceResponseBase.cpp:
799         (WebCore::ResourceResponseBase::updateHeaderParsedState): Move headers' parsed state update code
800         from setHTTPHeaderField() to a new updateHeaderParsedState() method to avoid code duplication.
801         (WebCore):
802         (WebCore::ResourceResponseBase::setHTTPHeaderField):
803         (WebCore::ResourceResponseBase::addHTTPHeaderField):
804         * platform/network/ResourceResponseBase.h:
805         (ResourceResponseBase):
806         * platform/network/soup/ResourceResponseSoup.cpp:
807         (WebCore::ResourceResponse::updateFromSoupMessageHeaders): Use ResourceResponseBase::addHTTPHeaderField().
808
809 2013-02-14  Philip Rogers  <pdr@google.com>
810
811         Prevent inconsistent firstChild during document destruction
812         https://bugs.webkit.org/show_bug.cgi?id=106530
813
814         Reviewed by Abhishek Arya.
815
816         During document destruction, addChildNodesToDeletionQueue can allow a container
817         node to have an invalid first child, causing a crash. This patch updates
818         addChildNodesToDeletionQueue to maintain a valid value for firstChild() even
819         while updating its children.
820
821         Test: svg/custom/animateMotion-path-change-crash.svg
822
823         * dom/ContainerNodeAlgorithms.h:
824         (WebCore::Private::addChildNodesToDeletionQueue):
825             To ensure prevoiusSibling() is also valid, this code was slightly refactored
826             to call setPreviousSibling(0) on the next node instead of the current node.
827
828 2013-02-14  Julien Chaffraix  <jchaffraix@webkit.org>
829
830         [CSS Grid Layout] Add an internal 2D grid representation to RenderGrid
831         https://bugs.webkit.org/show_bug.cgi?id=109714
832
833         Reviewed by Ojan Vafai.
834
835         This change introduces a 2D grid representation of the grid areas. Our implementation
836         is a straight Vector of Vectors for the grid areas, each grid area able to hold an
837         arbitrary number of RenderBox* so they hold a Vector of RenderBoxes. As an optimization,
838         each grid area has enough inline storage to hold one grid item which should cover
839         most cases.
840
841         In order to keep the code readable, a GridIterator was introduced to hide the new grid.
842
843         Refactoring, covered by existing tests.
844
845         * rendering/RenderGrid.cpp:
846         (RenderGrid::GridIterator):
847         (WebCore::RenderGrid::GridIterator::GridIterator):
848         (WebCore::RenderGrid::GridIterator::nextGridItem):
849         Added a mono-directional iterator. In order to be more aligned with the rest of the code,
850         this iterator actually walks orthogonally to the |direction| (ie fixing the |direction|'s track).
851
852         * rendering/RenderGrid.cpp:
853         (WebCore::RenderGrid::computePreferredLogicalWidths):
854         (WebCore::RenderGrid::layoutGridItems):
855         Updated these 2 functions to place the items on the grid and clear it at the end.
856
857         (WebCore::RenderGrid::computePreferredTrackWidth):
858         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
859         Updated to use the GridIterator to walk over the rows / columns.
860
861         (WebCore::RenderGrid::placeItemsOnGrid):
862         Added this function that inserts the grid items into the right grid area.
863
864         * rendering/RenderGrid.h:
865         (WebCore::RenderGrid::gridColumnCount):
866         (WebCore::RenderGrid::gridRowCount):
867         Added these helper functions.
868
869 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
870
871         Unreviewed, rolling out r141990.
872         http://trac.webkit.org/changeset/141990
873         https://bugs.webkit.org/show_bug.cgi?id=109850
874
875         ~5% regression on intl2 page cycler (Requested by kling on
876         #webkit).
877
878         * platform/graphics/GlyphPage.h:
879         (WebCore::GlyphPage::create):
880         (WebCore::GlyphPage::glyphDataForCharacter):
881         (WebCore::GlyphPage::glyphDataForIndex):
882         (WebCore::GlyphPage::fontDataForCharacter):
883         (WebCore::GlyphPage::setGlyphDataForIndex):
884         (GlyphPage):
885         (WebCore::GlyphPage::copyFrom):
886         (WebCore::GlyphPage::clear):
887         (WebCore::GlyphPage::clearForFontData):
888         (WebCore::GlyphPage::GlyphPage):
889         * platform/graphics/GlyphPageTreeNode.cpp:
890         (WebCore::GlyphPageTreeNode::initializePage):
891         * rendering/svg/SVGTextRunRenderingContext.cpp:
892         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
893
894 2013-02-14  Mark Pilgrim  <pilgrim@chromium.org>
895
896         [Chromium] Move PlatformMessagePortChannel to WebCore
897         https://bugs.webkit.org/show_bug.cgi?id=109845
898
899         Reviewed by Adam Barth.
900
901         Part of a larger refactoring series; see tracking bug 106829.
902
903         * WebCore.gyp/WebCore.gyp:
904         * WebCore.gypi:
905         * dom/default/chromium: Added.
906         * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: Added.
907         (WebCore):
908         (WebCore::MessagePortChannel::create):
909         (WebCore::MessagePortChannel::createChannel):
910         (WebCore::MessagePortChannel::MessagePortChannel):
911         (WebCore::MessagePortChannel::~MessagePortChannel):
912         (WebCore::MessagePortChannel::entangleIfOpen):
913         (WebCore::MessagePortChannel::disentangle):
914         (WebCore::MessagePortChannel::postMessageToRemote):
915         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
916         (WebCore::MessagePortChannel::close):
917         (WebCore::MessagePortChannel::isConnectedTo):
918         (WebCore::MessagePortChannel::hasPendingActivity):
919         (WebCore::MessagePortChannel::locallyEntangledPort):
920         (WebCore::PlatformMessagePortChannel::create):
921         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
922         (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
923         (WebCore::PlatformMessagePortChannel::createChannel):
924         (WebCore::PlatformMessagePortChannel::messageAvailable):
925         (WebCore::PlatformMessagePortChannel::entangleIfOpen):
926         (WebCore::PlatformMessagePortChannel::disentangle):
927         (WebCore::PlatformMessagePortChannel::postMessageToRemote):
928         (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
929         (WebCore::PlatformMessagePortChannel::close):
930         (WebCore::PlatformMessagePortChannel::isConnectedTo):
931         (WebCore::PlatformMessagePortChannel::hasPendingActivity):
932         (WebCore::PlatformMessagePortChannel::setEntangledChannel):
933         (WebCore::PlatformMessagePortChannel::webChannelRelease):
934         * dom/default/chromium/PlatformMessagePortChannelChromium.h: Added.
935         (WebKit):
936         (WebCore):
937         (PlatformMessagePortChannel):
938
939 2013-02-14  Chris Fleizach  <cfleizach@apple.com>
940
941         Remove Leopard Accessibility support from WebCore (now that no port builds on Leopard)
942         https://bugs.webkit.org/show_bug.cgi?id=90250
943
944         Reviewed by Eric Seidel.
945
946         The Leopard era checks for accessibility lists and accessibility tables can be removed now.
947
948         * accessibility/AccessibilityARIAGrid.cpp:
949         (WebCore):
950         * accessibility/AccessibilityARIAGrid.h:
951         (AccessibilityARIAGrid):
952         (WebCore::AccessibilityARIAGrid::isTableExposableThroughAccessibility):
953         * accessibility/AccessibilityList.cpp:
954         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
955         * accessibility/AccessibilityList.h:
956         * accessibility/AccessibilityTable.cpp:
957         (WebCore::AccessibilityTable::AccessibilityTable):
958         (WebCore::AccessibilityTable::init):
959         * accessibility/AccessibilityTable.h:
960         (AccessibilityTable):
961         * accessibility/mac/AXObjectCacheMac.mm:
962         (WebCore::AXObjectCache::postPlatformNotification):
963         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
964         (createAccessibilityRoleMap):
965
966 2013-02-14  Bear Travis  <betravis@adobe.com>
967
968         Make outside-shape the default value for shape-inside
969         https://bugs.webkit.org/show_bug.cgi?id=109605
970
971         Reviewed by Levi Weintraub.
972
973         Creating a single reference outside-shape value and setting it as the default
974         for shape-inside.
975
976         Existing tests cover the default value, just updating them to use outside-shape.
977
978         * rendering/style/RenderStyle.cpp:
979         (WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape
980         value.
981         (WebCore):
982         * rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp
983         file.
984
985 2013-02-14  Min Qin  <qinmin@chromium.org>
986
987         Passing alpha to DeferredImageDecoder once decoding completes
988         https://bugs.webkit.org/show_bug.cgi?id=108892
989
990         Reviewed by Stephen White.
991
992         We should pass hasAlpha value back to the DeferredImageDecoder once decoding is completed
993         Added unit tests in ImageFrameGeneratorTest.
994
995         * platform/graphics/chromium/DeferredImageDecoder.cpp:
996         (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
997         * platform/graphics/chromium/ImageFrameGenerator.cpp:
998         (WebCore::ImageFrameGenerator::tryToScale):
999         (WebCore::ImageFrameGenerator::decode):
1000         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1001         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1002         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
1003         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1004         (WebCore::LazyDecodingPixelRef::hasAlpha):
1005         (LazyDecodingPixelRef):
1006         * platform/graphics/chromium/ScaledImageFragment.cpp:
1007         (WebCore::ScaledImageFragment::ScaledImageFragment):
1008         * platform/graphics/chromium/ScaledImageFragment.h:
1009         (WebCore::ScaledImageFragment::create):
1010         (ScaledImageFragment):
1011         (WebCore::ScaledImageFragment::hasAlpha):
1012
1013 2013-02-14  David Grogan  <dgrogan@chromium.org>
1014
1015         IndexedDB: Add a few more histogram calls
1016         https://bugs.webkit.org/show_bug.cgi?id=109762
1017
1018         Reviewed by Tony Chang.
1019
1020         A few places where commits could fail weren't being logged.
1021
1022         * Modules/indexeddb/IDBBackingStore.cpp:
1023         (WebCore::IDBBackingStore::deleteDatabase):
1024         (WebCore::IDBBackingStore::Transaction::commit):
1025
1026 2013-02-14  Tony Chang  <tony@chromium.org>
1027
1028         Padding and border changes doesn't trigger relayout of children
1029         https://bugs.webkit.org/show_bug.cgi?id=109639
1030
1031         Reviewed by Kent Tamura.
1032
1033         In RenderBlock::layoutBlock, we only relayout our children if our logical width
1034         changes. This misses cases where our logical width doesn't change (i.e., padding
1035         or border changes), but our content width does change.
1036
1037         This is a more general case of bug 104997.
1038
1039         Test: fast/block/dynamic-padding-border.html
1040
1041         * rendering/RenderBox.cpp:
1042         (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
1043         (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
1044         even without border-box box sizing.
1045
1046 2013-02-14  Peter Rybin  <prybin@chromium.org>
1047
1048         Web Inspector: fix closure compilation warnings caused by setVariableValue change
1049         https://bugs.webkit.org/show_bug.cgi?id=109488
1050
1051         Reviewed by Pavel Feldman.
1052
1053         Annotations are fixed as required by closure compiler.
1054         Parameters in Inspector.json are reordered as required.
1055
1056         * inspector/InjectedScriptExterns.js:
1057         (InjectedScriptHost.prototype.setFunctionVariableValue):
1058         (JavaScriptCallFrame.prototype.setVariableValue):
1059         * inspector/InjectedScriptSource.js:
1060         (.):
1061         * inspector/Inspector.json:
1062         * inspector/InspectorDebuggerAgent.cpp:
1063         (WebCore::InspectorDebuggerAgent::setVariableValue):
1064         * inspector/InspectorDebuggerAgent.h:
1065         (InspectorDebuggerAgent):
1066
1067 2013-02-14  Tommy Widenflycht  <tommyw@google.com>
1068
1069         MediaStream API: RTCDataChannel triggers a use-after-free
1070         https://bugs.webkit.org/show_bug.cgi?id=109806
1071
1072         Reviewed by Adam Barth.
1073
1074         Making sure RTCPeerConnection::stop() is always called at least once.
1075         Also making sure that RTCDataChannels state gets set to Closed correctly.
1076
1077         Hard to test in WebKit but covered by Chromium tests.
1078
1079         * Modules/mediastream/RTCDataChannel.cpp:
1080         (WebCore::RTCDataChannel::stop):
1081         * Modules/mediastream/RTCPeerConnection.cpp:
1082         (WebCore::RTCPeerConnection::~RTCPeerConnection):
1083         (WebCore::RTCPeerConnection::stop):
1084
1085 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
1086
1087         Web Inspector: [Regression] When several consecutive characters are typed each of them is marked as undoable state.
1088         https://bugs.webkit.org/show_bug.cgi?id=109823
1089
1090         Reviewed by Pavel Feldman.
1091
1092         * inspector/front-end/TextEditorModel.js:
1093         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1094
1095 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1096
1097         Unreviewed, rolling out r142820.
1098         http://trac.webkit.org/changeset/142820
1099         https://bugs.webkit.org/show_bug.cgi?id=109839
1100
1101         Causing crashes on chromium canaries (Requested by atwilson_
1102         on #webkit).
1103
1104         * dom/Document.cpp:
1105         (WebCore::Document::updateLayout):
1106         (WebCore::Document::implicitClose):
1107         * rendering/RenderQuote.h:
1108         (RenderQuote):
1109         * rendering/RenderView.cpp:
1110         * rendering/RenderView.h:
1111
1112 2013-02-14  Mario Sanchez Prada  <mario.prada@samsung.com>
1113
1114         [GTK] Missing call to g_object_ref while retrieving accessible table cells
1115         https://bugs.webkit.org/show_bug.cgi?id=106903
1116
1117         Reviewed by Martin Robinson.
1118
1119         Add missing extra ref to implementation of atk_table_ref_at().
1120
1121         Test: accessibility/table-cell-for-column-and-row-crash.html
1122
1123         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
1124         (webkitAccessibleTableRefAt): This method transfers full ownership
1125         over the returned AtkObject, so an extra reference is needed here.
1126
1127 2013-02-14  Mike Fenton  <mifenton@rim.com>
1128
1129         [BlackBerry] Update keyboard event details to match platform details.
1130         https://bugs.webkit.org/show_bug.cgi?id=109693
1131
1132         Reviewed by Yong Li.
1133
1134         PR 220170.
1135
1136         Update the keyboard event details to match the
1137         platform details available.
1138
1139         Rename helper function to better describe the conversion.
1140
1141         Reviewed Internally by Nima Ghanavatian and Gen Mak.
1142
1143         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
1144         (WebCore::windowsKeyCodeForBlackBerryKeycode):
1145         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1146
1147 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
1148
1149         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
1150         https://bugs.webkit.org/show_bug.cgi?id=109192
1151
1152         Reviewed by Pavel Feldman.
1153
1154         - remove frame and compositing instrumentation methods from InspectorInstrumentation;
1155         - expose those methods on InspectorController instead.
1156
1157         * WebCore.exp.in:
1158         * inspector/InspectorController.cpp:
1159         (WebCore::InspectorController::didBeginFrame):
1160         (WebCore):
1161         (WebCore::InspectorController::didCancelFrame):
1162         (WebCore::InspectorController::willComposite):
1163         (WebCore::InspectorController::didComposite):
1164         * inspector/InspectorController.h:
1165         (InspectorController):
1166         * inspector/InspectorInstrumentation.cpp:
1167         (WebCore):
1168         * inspector/InspectorInstrumentation.h:
1169         (InspectorInstrumentation):
1170         * testing/Internals.cpp:
1171         (WebCore::Internals::emitInspectorDidBeginFrame):
1172         (WebCore::Internals::emitInspectorDidCancelFrame):
1173
1174 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1175
1176         Web Inspector: Fixed a layout regression in CanvasProfileView.
1177         https://bugs.webkit.org/show_bug.cgi?id=109835
1178
1179         Reviewed by Pavel Feldman.
1180
1181         Changed splitView.css to supported nested SplitView instances.
1182
1183         * inspector/front-end/splitView.css:
1184         (.split-view-vertical > .split-view-contents):
1185         (.split-view-vertical > .split-view-contents-first):
1186         (.split-view-vertical > .split-view-contents-first.maximized):
1187         (.split-view-vertical > .split-view-contents-second):
1188         (.split-view-vertical > .split-view-contents-second.maximized):
1189         (.split-view-horizontal > .split-view-contents):
1190         (.split-view-horizontal > .split-view-contents-first):
1191         (.split-view-horizontal > .split-view-contents-first.maximized):
1192         (.split-view-horizontal > .split-view-contents-second):
1193         (.split-view-horizontal > .split-view-contents-second.maximized):
1194         (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)):
1195         (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)):
1196         (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)):
1197         (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)):
1198         (.split-view-vertical > .split-view-resizer):
1199         (.split-view-horizontal > .split-view-resizer):
1200
1201 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1202
1203         Web Inspector: Color picker should not be available in Computed Styles pane.
1204         https://bugs.webkit.org/show_bug.cgi?id=109697
1205
1206         Reviewed by Alexander Pavlov.
1207
1208         Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value
1209         (the ComputedStyleSidebarPane instance).
1210
1211         * inspector/front-end/StylesSidebarPane.js:
1212         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
1213
1214 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
1215
1216         Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
1217         https://bugs.webkit.org/show_bug.cgi?id=109811
1218
1219         Reviewed by Pavel Feldman.
1220
1221         Use const char* constant value instead of creating String from it in thread-unsafe
1222         static local variable.
1223
1224         * inspector/InspectorTimelineAgent.cpp:
1225         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1226
1227 2013-02-14  Pan Deng  <pan.deng@intel.com>
1228
1229         [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
1230         https://bugs.webkit.org/show_bug.cgi?id=108746.
1231
1232         Reviewed by Vsevolod Vlasov.
1233
1234         WebInspector.displayNameForURL() does not work as expected in the reload scenario,
1235         for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
1236         the full host name will be displayed.
1237         This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
1238
1239         No new tests.
1240
1241         * inspector/front-end/ParsedURL.js:
1242         (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
1243         * inspector/front-end/ResourceUtils.js:
1244         (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
1245
1246 2013-02-14  Alexei Filippov  <alph@chromium.org>
1247
1248         Web Inspector: fix to record button remaining red after heap snapshot is taken
1249         https://bugs.webkit.org/show_bug.cgi?id=109804
1250
1251         Reviewed by Yury Semikhatsky.
1252
1253         Revert part of r142243 fix. Namely heap snapshot taking button made
1254         stateless as it was before.
1255
1256         * inspector/front-end/HeapSnapshotView.js:
1257         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
1258         * inspector/front-end/ProfilesPanel.js:
1259         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
1260
1261 2013-02-14  Alexander Pavlov  <apavlov@chromium.org>
1262
1263         Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code
1264         https://bugs.webkit.org/show_bug.cgi?id=109801
1265
1266         Reviewed by Yury Semikhatsky.
1267
1268         No new tests, as existing tests cover the change.
1269
1270         * inspector/InspectorAgent.cpp:
1271         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
1272         * inspector/InspectorIndexedDBAgent.cpp:
1273         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
1274         * inspector/InspectorPageAgent.cpp:
1275         (WebCore::InspectorPageAgent::buildObjectForFrame):
1276         * inspector/PageRuntimeAgent.cpp:
1277         (WebCore::PageRuntimeAgent::notifyContextCreated):
1278
1279 2013-02-14  Sergio Villar Senin  <svillar@igalia.com>
1280
1281         Add logging support to IndexedDB for non-Chromium platforms
1282         https://bugs.webkit.org/show_bug.cgi?id=109809
1283
1284         Reviewed by Kentaro Hara.
1285
1286         Enable logging of IndexedDB through the StorageAPI log channel for
1287         non-Chromium architectures.
1288
1289         No new tests required, we're just enabling logging for IndexedDB
1290         using the currently available logging framework.
1291
1292         * Modules/indexeddb/IDBTracing.h:
1293
1294 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
1295
1296         Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping.
1297         https://bugs.webkit.org/show_bug.cgi?id=109704
1298
1299         Reviewed by Alexander Pavlov.
1300
1301         Replaced this methods with one line implementation on the only call site.
1302
1303         * inspector/front-end/FileSystemMapping.js:
1304         * inspector/front-end/FileSystemProjectDelegate.js:
1305         (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI):
1306         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
1307         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
1308         (WebInspector.FileSystemProjectDelegate.prototype._populate):
1309
1310 2013-02-14  Anton Vayvod  <avayvod@chromium.org>
1311
1312         [Text Autosizing] Process narrow descendants with the same multiplier for the font size.
1313         https://bugs.webkit.org/show_bug.cgi?id=109573
1314
1315         Reviewed by Julien Chaffraix.
1316
1317         Combine narrow descendants of the same autosizing cluster into a group that is autosized
1318         with the same multiplier.
1319
1320         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
1321         a large margin individually applied (via a CSS selector), causing them all to individually
1322         appear narrower than their enclosing blockContainingAllText. Rather than making each of
1323         these paragraphs into a separate cluster, we want them all to share the same multiplier, as
1324         if they were a single cluster.
1325
1326         Test: fast/text-autosizing/narrow-descendants-combined.html
1327
1328         * rendering/TextAutosizer.cpp:
1329         (WebCore::TextAutosizer::processClusterInternal):
1330
1331             Common implementation for processCluster() and processCompositeCluster that accepts the
1332             text width and whether the cluster should be autosized as parameters instead of
1333             calculating it inline.
1334
1335         (WebCore::TextAutosizer::processCluster):
1336
1337             Calculates the text width for a single cluster and whether it should be autosized, then
1338             calls processClusterInternal() to apply the multiplier and process the cluster's
1339             descendants.
1340
1341         (WebCore::TextAutosizer::processCompositeCluster):
1342
1343             Calculates the text width for a group of renderers and if the group should be autosized,
1344             then calls processClusterInternal() repeatedly with the same multiplier to apply it and
1345             process all the descendants of the group.
1346
1347         (WebCore::TextAutosizer::clusterShouldBeAutosized):
1348
1349             Calls the multiple renderers version to avoid code duplication.
1350
1351         (WebCore::TextAutosizer::compositeClusterShouldBeAutosized):
1352
1353             The multiple renderers version of clusterShouldBeAutosized.
1354
1355         * rendering/TextAutosizer.h:
1356
1357             Updated method declarations.
1358
1359 2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
1360
1361         Look into possibilities of typedef in webkit idl files
1362         https://bugs.webkit.org/show_bug.cgi?id=52340
1363
1364         Reviewed by Kentaro Hara.
1365
1366         Add typedef support for WebKit IDL parser.
1367         Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
1368
1369         Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
1370
1371         * bindings/scripts/IDLParser.pm:
1372         (assertNoExtendedAttributesInTypedef):
1373         (parseDefinitions):
1374         (applyTypedefs):
1375         (applyTypedefsForSignature):
1376         (parseTypedef):
1377         (parseUnrestrictedFloatType):
1378         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
1379         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
1380         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
1381         (WebDOMTestTypedefs::WebDOMTestTypedefs):
1382         (WebDOMTestTypedefs::operator=):
1383         (WebDOMTestTypedefs::impl):
1384         (WebDOMTestTypedefs::~WebDOMTestTypedefs):
1385         (WebDOMTestTypedefs::unsignedLongLongAttr):
1386         (WebDOMTestTypedefs::setUnsignedLongLongAttr):
1387         (WebDOMTestTypedefs::immutableSerializedScriptValue):
1388         (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
1389         (WebDOMTestTypedefs::func):
1390         (WebDOMTestTypedefs::multiTransferList):
1391         (WebDOMTestTypedefs::setShadow):
1392         (WebDOMTestTypedefs::nullableArrayArg):
1393         (WebDOMTestTypedefs::immutablePointFunction):
1394         (toWebCore):
1395         (toWebKit):
1396         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
1397         (WebCore):
1398         (WebDOMTestTypedefs):
1399         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
1400         (_WebKitDOMTestTypedefsPrivate):
1401         (WebKit):
1402         (WebKit::kit):
1403         (WebKit::core):
1404         (WebKit::wrapTestTypedefs):
1405         (webkit_dom_test_typedefs_finalize):
1406         (webkit_dom_test_typedefs_set_property):
1407         (webkit_dom_test_typedefs_get_property):
1408         (webkit_dom_test_typedefs_constructor):
1409         (webkit_dom_test_typedefs_class_init):
1410         (webkit_dom_test_typedefs_init):
1411         (webkit_dom_test_typedefs_func):
1412         (webkit_dom_test_typedefs_multi_transfer_list):
1413         (webkit_dom_test_typedefs_set_shadow):
1414         (webkit_dom_test_typedefs_nullable_array_arg):
1415         (webkit_dom_test_typedefs_immutable_point_function):
1416         (webkit_dom_test_typedefs_string_array_function):
1417         (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
1418         (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
1419         (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
1420         (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
1421         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
1422         (_WebKitDOMTestTypedefs):
1423         (_WebKitDOMTestTypedefsClass):
1424         * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
1425         (WebKit):
1426         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
1427         (WebCore):
1428         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
1429         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
1430         (WebCore::JSTestTypedefsConstructor::finishCreation):
1431         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
1432         (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
1433         (WebCore::JSTestTypedefsConstructor::getConstructData):
1434         (WebCore::JSTestTypedefsPrototype::self):
1435         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
1436         (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
1437         (WebCore::JSTestTypedefs::JSTestTypedefs):
1438         (WebCore::JSTestTypedefs::finishCreation):
1439         (WebCore::JSTestTypedefs::createPrototype):
1440         (WebCore::JSTestTypedefs::destroy):
1441         (WebCore::JSTestTypedefs::~JSTestTypedefs):
1442         (WebCore::JSTestTypedefs::getOwnPropertySlot):
1443         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
1444         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
1445         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
1446         (WebCore::jsTestTypedefsConstructorTestSubObj):
1447         (WebCore::jsTestTypedefsConstructor):
1448         (WebCore::JSTestTypedefs::put):
1449         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1450         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1451         (WebCore::JSTestTypedefs::getConstructor):
1452         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
1453         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
1454         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1455         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1456         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
1457         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
1458         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
1459         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
1460         (WebCore::isObservable):
1461         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
1462         (WebCore::JSTestTypedefsOwner::finalize):
1463         (WebCore::toJS):
1464         (WebCore::toTestTypedefs):
1465         * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
1466         (WebCore):
1467         (JSTestTypedefs):
1468         (WebCore::JSTestTypedefs::create):
1469         (WebCore::JSTestTypedefs::createStructure):
1470         (WebCore::JSTestTypedefs::impl):
1471         (WebCore::JSTestTypedefs::releaseImpl):
1472         (WebCore::JSTestTypedefs::releaseImplIfNotNull):
1473         (JSTestTypedefsOwner):
1474         (WebCore::wrapperOwner):
1475         (WebCore::wrapperContext):
1476         (JSTestTypedefsPrototype):
1477         (WebCore::JSTestTypedefsPrototype::create):
1478         (WebCore::JSTestTypedefsPrototype::createStructure):
1479         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
1480         (JSTestTypedefsConstructor):
1481         (WebCore::JSTestTypedefsConstructor::create):
1482         (WebCore::JSTestTypedefsConstructor::createStructure):
1483         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
1484         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
1485         (-[DOMTestTypedefs dealloc]):
1486         (-[DOMTestTypedefs finalize]):
1487         (-[DOMTestTypedefs unsignedLongLongAttr]):
1488         (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
1489         (-[DOMTestTypedefs immutableSerializedScriptValue]):
1490         (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
1491         (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
1492         (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
1493         (-[DOMTestTypedefs immutablePointFunction]):
1494         (core):
1495         (kit):
1496         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
1497         (WebCore):
1498         * bindings/scripts/test/TestTypedefs.idl: Added.
1499         * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
1500         (WebCore):
1501         (WebCore::checkTypeOrDieTrying):
1502         (TestTypedefsV8Internal):
1503         (WebCore::TestTypedefsV8Internal::V8_USE):
1504         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
1505         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
1506         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
1507         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
1508         (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
1509         (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
1510         (WebCore::TestTypedefsV8Internal::funcCallback):
1511         (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
1512         (WebCore::TestTypedefsV8Internal::setShadowCallback):
1513         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
1514         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
1515         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
1516         (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
1517         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
1518         (WebCore::V8TestTypedefs::constructorCallback):
1519         (WebCore::ConfigureV8TestTypedefsTemplate):
1520         (WebCore::V8TestTypedefs::GetRawTemplate):
1521         (WebCore::V8TestTypedefs::GetTemplate):
1522         (WebCore::V8TestTypedefs::HasInstance):
1523         (WebCore::V8TestTypedefs::createWrapper):
1524         (WebCore::V8TestTypedefs::derefObject):
1525         * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
1526         (WebCore):
1527         (V8TestTypedefs):
1528         (WebCore::V8TestTypedefs::toNative):
1529         (WebCore::V8TestTypedefs::installPerContextProperties):
1530         (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
1531         (WebCore::wrap):
1532         (WebCore::toV8):
1533         (WebCore::toV8Fast):
1534
1535 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1536
1537         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
1538         and XXXAccessorSetter() to XXXAttrSetterCustom()
1539         https://bugs.webkit.org/show_bug.cgi?id=109679
1540
1541         Reviewed by Adam Barth.
1542
1543         For naming consistency and clarification.
1544
1545         No tests. No change in behavior.
1546
1547         * bindings/scripts/CodeGeneratorV8.pm:
1548         (GenerateHeader):
1549         (GenerateHeaderCustomCall):
1550         (GenerateNormalAttrGetter):
1551         (GenerateNormalAttrSetter):
1552         (GenerateImplementation):
1553         * bindings/scripts/test/V8/V8TestInterface.cpp:
1554         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1555         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1556         * bindings/scripts/test/V8/V8TestObj.cpp:
1557         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1558         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1559         * bindings/scripts/test/V8/V8TestObj.h:
1560         (V8TestObj):
1561         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
1562         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
1563         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
1564         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
1565         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1566         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
1567         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
1568         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
1569         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
1570         * bindings/v8/custom/V8ClipboardCustom.cpp:
1571         (WebCore::V8Clipboard::typesAttrGetterCustom):
1572         * bindings/v8/custom/V8CoordinatesCustom.cpp:
1573         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
1574         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
1575         (WebCore::V8Coordinates::headingAttrGetterCustom):
1576         (WebCore::V8Coordinates::speedAttrGetterCustom):
1577         * bindings/v8/custom/V8CustomEventCustom.cpp:
1578         (WebCore::V8CustomEvent::detailAttrGetterCustom):
1579         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1580         (WebCore::V8DOMWindow::eventAttrGetterCustom):
1581         (WebCore::V8DOMWindow::eventAttrSetterCustom):
1582         (WebCore::V8DOMWindow::locationAttrSetterCustom):
1583         (WebCore::V8DOMWindow::openerAttrSetterCustom):
1584         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1585         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
1586         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
1587         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
1588         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
1589         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1590         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
1591         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
1592         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
1593         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
1594         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1595         (WebCore::V8Document::locationAttrGetterCustom):
1596         (WebCore::V8Document::locationAttrSetterCustom):
1597         * bindings/v8/custom/V8EventCustom.cpp:
1598         (WebCore::V8Event::dataTransferAttrGetterCustom):
1599         (WebCore::V8Event::clipboardDataAttrGetterCustom):
1600         * bindings/v8/custom/V8FileReaderCustom.cpp:
1601         (WebCore::V8FileReader::resultAttrGetterCustom):
1602         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1603         (WebCore::V8HTMLDocument::allAttrSetterCustom):
1604         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1605         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
1606         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
1607         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
1608         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
1609         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1610         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
1611         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
1612         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
1613         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
1614         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
1615         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
1616         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
1617         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
1618         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
1619         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
1620         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
1621         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1622         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
1623         * bindings/v8/custom/V8HistoryCustom.cpp:
1624         (WebCore::V8History::stateAttrGetterCustom):
1625         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1626         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
1627         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
1628         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
1629         * bindings/v8/custom/V8LocationCustom.cpp:
1630         (WebCore::V8Location::hashAttrSetterCustom):
1631         (WebCore::V8Location::hostAttrSetterCustom):
1632         (WebCore::V8Location::hostnameAttrSetterCustom):
1633         (WebCore::V8Location::hrefAttrSetterCustom):
1634         (WebCore::V8Location::pathnameAttrSetterCustom):
1635         (WebCore::V8Location::portAttrSetterCustom):
1636         (WebCore::V8Location::protocolAttrSetterCustom):
1637         (WebCore::V8Location::searchAttrSetterCustom):
1638         (WebCore::V8Location::reloadAttrGetterCustom):
1639         (WebCore::V8Location::replaceAttrGetterCustom):
1640         (WebCore::V8Location::assignAttrGetterCustom):
1641         * bindings/v8/custom/V8MessageEventCustom.cpp:
1642         (WebCore::V8MessageEvent::dataAttrGetterCustom):
1643         (WebCore::V8MessageEvent::portsAttrGetterCustom):
1644         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
1645         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
1646         * bindings/v8/custom/V8PannerNodeCustom.cpp:
1647         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
1648         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
1649         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1650         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
1651         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1652         (WebCore::V8SVGLength::valueAttrGetterCustom):
1653         (WebCore::V8SVGLength::valueAttrSetterCustom):
1654         * bindings/v8/custom/V8TrackEventCustom.cpp:
1655         (WebCore::V8TrackEvent::trackAttrGetterCustom):
1656         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
1657         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
1658         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1659         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
1660         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
1661
1662 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
1663
1664         Web Inspector: extract DOM counters graph implementation into its own class
1665         https://bugs.webkit.org/show_bug.cgi?id=109796
1666
1667         Reviewed by Alexander Pavlov.
1668
1669         Extracted DOM counters graph implementation into DOMCountersGraph.js leaving
1670         in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js
1671         Added some closure annotations and converted object literals into classes
1672         with named constructors.
1673
1674         * WebCore.gypi:
1675         * WebCore.vcproj/WebCore.vcproj:
1676         * inspector/compile-front-end.py:
1677         * inspector/front-end/DOMCountersGraph.js: Added.
1678         (WebInspector.DOMCountersGraph):
1679         (WebInspector.DOMCounterUI):
1680         (WebInspector.DOMCountersGraph.Counter):
1681         (WebInspector.DOMCounterUI.prototype.setRange):
1682         (WebInspector.DOMCounterUI.prototype.updateCurrentValue):
1683         (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker):
1684         (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker):
1685         (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker):
1686         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
1687         (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar):
1688         (WebInspector.DOMCountersGraph.prototype._createCounterUIList):
1689         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount):
1690         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount):
1691         (WebInspector.DOMCountersGraph.prototype._canvasHeight):
1692         (WebInspector.DOMCountersGraph.prototype._onRecordAdded):
1693         (WebInspector.DOMCountersGraph.prototype._draw):
1694         (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker):
1695         (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker):
1696         (WebInspector.DOMCountersGraph.prototype._drawMarker):
1697         (WebInspector.DOMCountersGraph.prototype._drawGraph):
1698         (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker):
1699         * inspector/front-end/MemoryStatistics.js:
1700         (WebInspector.MemoryStatistics):
1701         (WebInspector.MemoryStatistics.Counter):
1702         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
1703         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
1704         (WebInspector.MemoryStatistics.prototype.setTopPosition):
1705         (WebInspector.MemoryStatistics.prototype._canvasHeight):
1706         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
1707         (WebInspector.MemoryStatistics.prototype._draw):
1708         (WebInspector.MemoryStatistics.prototype._onClick):
1709         (WebInspector.MemoryStatistics.prototype._onMouseOut):
1710         (WebInspector.MemoryStatistics.prototype._onMouseOver):
1711         (WebInspector.MemoryStatistics.prototype._onMouseMove):
1712         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
1713         (WebInspector.MemoryStatistics.prototype._drawMarker):
1714         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
1715         * inspector/front-end/NativeMemoryGraph.js:
1716         (WebInspector.NativeMemoryGraph.Counter):
1717         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
1718         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
1719         (WebInspector.NativeMemoryGraph.prototype._draw):
1720         * inspector/front-end/TimelinePanel.js:
1721         * inspector/front-end/WebKit.qrc:
1722
1723 2013-02-14  Aivo Paas  <aivopaas@gmail.com>
1724
1725         Updating mouse cursor on style changes without emitting fake mousemove event
1726         https://bugs.webkit.org/show_bug.cgi?id=101857
1727
1728         Reviewed by Allan Sandfeld Jensen.
1729
1730         Mouse cursor changes in styles used to be reflected in UI through dispatching a fake
1731         mousemove event. The old approach has some flaws: it emits a mousemove event in
1732         javascript when there is no mouse movement involved (bug 85343); the fake mousemove
1733         event is cancelled while there is a mouse button held down - cursor won't change
1734         until mouse is moved or the button released (bug 53341); it has extra overhead of
1735         using a timer which was introduced to make scrolling smoother.
1736
1737         The new approach does not use the fake mousemove event. Instead, it uses only the logic
1738         needed for the actual cursor change to happen. This bypasses all the mousemove event related
1739         overhead. The remaining code is a stripped version of what was run through the mousemove
1740         event path. Everything that was not needed for changing a cursor is stripped off, everything
1741         that is needed, remains the same.
1742
1743         The call to update cursor was moved up in the call tree from RenderObject::StyleDidChange
1744         to RenderObject::SetStyle right after the StyleDidChange call. This allows to any updates
1745         and style propagations in StyleDidChange to happen and makes sure that a cursor change is
1746         not missed. Previous place was at the end of RenderObject::StyleDidChange, where it could
1747         have been missed because of an early exit. For example, cursor change on mousedown/up on
1748         a text node missed the correct cursor in the first pass.
1749
1750         Refactored EventHandler::selectCursor to not take a whole mouse event but instead work with
1751         HitTestResult so that EventHandler::updateCursor must not create a useless PlatformEvent.
1752
1753         Fixes: https://bugs.webkit.org/show_bug.cgi?id=85343 (mousemove event on cursor change)
1754                https://bugs.webkit.org/show_bug.cgi?id=53341 (no cursor change when mouse button down)
1755
1756         Tests: fast/events/mouse-cursor-change.html
1757                fast/events/mouse-cursor-no-mousemove.html
1758
1759         * page/EventHandler.cpp:
1760         (WebCore::EventHandler::updateCursor): Newly added method for updating mouse cursor
1761         (WebCore):
1762         (WebCore::EventHandler::selectCursor):
1763         (WebCore::EventHandler::handleMouseMoveEvent):
1764         * page/EventHandler.h:
1765         (EventHandler):
1766         * rendering/RenderObject.cpp:
1767         (WebCore::areNonIdenticalCursorListsEqual):
1768         (WebCore):
1769         (WebCore::areCursorsEqual):
1770         (WebCore::RenderObject::setStyle):
1771         (WebCore::RenderObject::styleDidChange):
1772
1773 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
1774
1775         Web Inspector: Native Memory Instrumentation: Report child nodes as direct members of a container node to make them look like a tree in the snapshot.
1776         https://bugs.webkit.org/show_bug.cgi?id=109703
1777
1778         Also we need to traverse the tree from the top root element down to the leaves.
1779
1780         Reviewed by Yury Semikhatsky.
1781
1782         * dom/ContainerNode.cpp:
1783         (WebCore::ContainerNode::reportMemoryUsage):
1784         * dom/Node.cpp:
1785         (WebCore::Node::reportMemoryUsage):
1786         * inspector/InspectorMemoryAgent.cpp:
1787         (WebCore):
1788
1789 2013-02-13  Hayato Ito  <hayato@chromium.org>
1790
1791         [Shadow DOM] Implements a '::distributed()' pseudo element.
1792         https://bugs.webkit.org/show_bug.cgi?id=82169
1793
1794         Reviewed by Dimitri Glazkov.
1795
1796         Implements a '::distributed()' pseudo element.
1797         See the Shadow DOM specification and the filed bug for the detail.
1798
1799         - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points
1800         - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
1801
1802         For example, suppose we are given the following DOM tree and shadow tree:
1803
1804         - <A>
1805           - <B>
1806             - <C>
1807
1808         [A's ShadowRoot]
1809           <D>
1810           - <style>
1811               E content::distributed(B C) { color: green; }
1812           - <E>
1813             - <content>  (Node B is distributed to this insertion point.)
1814
1815         In this case, the style rule defined in the shadow tree matches node 'C'.
1816
1817         A '::distributed()' pseudo element can not be a pseudo class since
1818         an intersection between matched_elements(some_selector) and
1819         matched_elements(some_selector::distributed(...)) is always an
1820         empty set. A '::distributed()' pseudo element is the first-ever
1821         *functional* pseudo element which takes a parameter, which can be
1822         a selector.
1823
1824         This rule crosses the shadow boundary from a shadow tree to the
1825         tree of its shadow host. That means a rule which includes
1826         '::distributed()' pseudo element is defined in shadow tree, but
1827         the node which is matched in the rule, the subject of the
1828         selector, is outside of the shadow tree. Therefore, we cannot
1829         predict where the subject of the selector will be beforehand.
1830         Current CSS implementation assumes the subject of the selector
1831         must exist in the current scope.
1832
1833         To overcome this issue, DocumentRuleSets now has a instance of
1834         ShadowDistributedRules class.  A style rule will be stored in this
1835         instance if the rule includes a '::distributed()' pseudo element.
1836         This class also keeps track of each RuleSet by mapping it with a
1837         scope where the rule was originally defined. In the example, the
1838         scope is A's ShadowRoot.  The scope is used to check whether the
1839         left-most matched element (in the example, it's a node 'E') exists
1840         in the scope.
1841
1842         Internally, a '::distributed' pseudo element is represented by a
1843         newly introduced 'ShadowDistributed' relation.  That makes an
1844         implementation of SelectorChecker::checkSelector() much simpler.
1845         A transformation from a distributed pseudo element to a
1846         ShadowDistributed is done in parsing stage of CSS.
1847
1848         Since '::distributed()' is an experimental feature, it's actually
1849         prefixed with '-webkit-' and guarded by SHADOW_DOM flag.
1850
1851         Tests: fast/dom/shadow/distributed-pseudo-element-for-shadow-element.html
1852                fast/dom/shadow/distributed-pseudo-element-match-all.html
1853                fast/dom/shadow/distributed-pseudo-element-match-descendant.html
1854                fast/dom/shadow/distributed-pseudo-element-nested.html
1855                fast/dom/shadow/distributed-pseudo-element-no-match.html
1856                fast/dom/shadow/distributed-pseudo-element-reprojection.html
1857                fast/dom/shadow/distributed-pseudo-element-scoped.html
1858                fast/dom/shadow/distributed-pseudo-element-support-selector.html
1859                fast/dom/shadow/distributed-pseudo-element-used-in-selector-list.html
1860                fast/dom/shadow/distributed-pseudo-element-with-any.html
1861                fast/dom/shadow/distributed-pseudo-element.html
1862
1863         * css/CSSGrammar.y.in:
1864         CSS Grammar was updated to support '::distrbuted(selector)'.
1865         This pseudo element is the first pseudo element which can take a selector as a parameter.
1866         * css/CSSParser.cpp:
1867         (WebCore::CSSParser::detectDashToken):
1868         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
1869         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
1870         Here we are converting a '::distributed' pseudo element into a
1871         ShadowDistributed relation internally.  To support the conversion,
1872         these rewriteSpecifiersXXX functions (formally called
1873         updateSpecifiersXXX) now return the specifiers which may be
1874         converted.
1875         (WebCore::CSSParser::rewriteSpecifiers):
1876         * css/CSSParser.h:
1877         * css/CSSParserValues.cpp:
1878         (WebCore::CSSParserSelector::CSSParserSelector):
1879         * css/CSSParserValues.h:
1880         (CSSParserSelector):
1881         (WebCore::CSSParserSelector::functionArgumentSelector):
1882         To hold an intermediate selector which appears at the position of an argument in
1883         functional pseudo element when parsing CSS.
1884         (WebCore::CSSParserSelector::setFunctionArgumentSelector):
1885         (WebCore::CSSParserSelector::isDistributedPseudoElement):
1886         * css/CSSSelector.cpp:
1887         Add new pseudo element, PseudoDistributed, and its internal representation, ShadowDistributed relation.
1888         (WebCore::CSSSelector::pseudoId):
1889         (WebCore::nameToPseudoTypeMap):
1890         (WebCore::CSSSelector::extractPseudoType):
1891         (WebCore::CSSSelector::selectorText):
1892         * css/CSSSelector.h:
1893         (CSSSelector):
1894         (WebCore):
1895         (WebCore::CSSSelector::isDistributedPseudoElement):
1896         (WebCore::CSSSelector::isShadowDistributed):
1897         * css/CSSSelectorList.cpp:
1898         (WebCore):
1899         (SelectorHasShadowDistributed):
1900         (WebCore::SelectorHasShadowDistributed::operator()):
1901         (WebCore::CSSSelectorList::hasShadowDistributedAt):
1902         * css/CSSSelectorList.h:
1903         (CSSSelectorList):
1904         * css/DocumentRuleSets.cpp:
1905         (WebCore):
1906         (WebCore::ShadowDistributedRules::addRule):
1907         Every CSS rule which includes '::distributed(...)' should be managed by calling this function.
1908         (WebCore::ShadowDistributedRules::collectMatchRequests):
1909         (WebCore::DocumentRuleSets::resetAuthorStyle):
1910         * css/DocumentRuleSets.h:
1911         (WebCore):
1912         (ShadowDistributedRules):
1913         (WebCore::ShadowDistributedRules::clear):
1914         (DocumentRuleSets):
1915         (WebCore::DocumentRuleSets::shadowDistributedRules)
1916         DocumentRuleSets owns an instance of ShadowDistributedRules.
1917         * css/RuleSet.cpp:
1918         (WebCore::RuleSet::addChildRules):
1919         Updated to check whether the rule contains '::distributed()' or not.
1920         * css/SelectorChecker.cpp:
1921         (WebCore::SelectorChecker::match):
1922         Support ShadowDistributed relation. Check all possible insertion points where a node is distributed.
1923         * css/SelectorChecker.h:
1924         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1925         Adds enum of BehaviorAtBoundary. '::distributed()' is the only
1926         rule which uses 'CrossedBoundary' since it is the only rule which
1927         crosses shadow boundaries.
1928         (SelectorCheckingContext):
1929         * css/SelectorFilter.cpp:
1930         (WebCore::SelectorFilter::collectIdentifierHashes):
1931         * css/StyleResolver.cpp:
1932         (WebCore::StyleResolver::collectMatchingRules):
1933         (WebCore::StyleResolver::matchAuthorRules):
1934         (WebCore::StyleResolver::collectMatchingRulesForList):
1935         (WebCore::StyleResolver::ruleMatches):
1936         * css/StyleResolver.h:
1937         (MatchRequest):
1938         (WebCore::MatchRequest::MatchRequest): Add behaviorAtBoundary field.
1939         (WebCore):
1940         (StyleResolver):
1941         * html/shadow/InsertionPoint.cpp:
1942         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
1943         (WebCore):
1944         * html/shadow/InsertionPoint.h:
1945         (WebCore):
1946
1947 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1948
1949         [V8] Generate wrapper methods for custom methods
1950         https://bugs.webkit.org/show_bug.cgi?id=109678
1951
1952         Reviewed by Adam Barth.
1953
1954         Currently V8 directly calls back custom methods written
1955         in custom binding files. This makes it impossible for code
1956         generators to hook custom methods (e.g. Code generators cannot
1957         insert a code for FeatureObservation into custom methods).
1958         To solve the problem, we should generate wrapper methods for
1959         custom methods.
1960
1961         No tests. No change in behavior.
1962
1963         * page/DOMWindow.idl: Removed overloaded methods. The fact that methods in an IDL
1964         file are overloaded but they are not overloaded in custom bindings confuses code
1965         generators. (For some reason, this problem hasn't appeared before this change.)
1966         * xml/XMLHttpRequest.idl: Ditto.
1967
1968         * bindings/scripts/CodeGeneratorV8.pm:
1969         (GenerateHeader):
1970         (GenerateDomainSafeFunctionGetter):
1971         (GenerateEventListenerCallback):
1972         (GenerateFunctionCallback):
1973         (GenerateNonStandardFunction):
1974         (GenerateImplementation):
1975         * bindings/scripts/test/V8/V8TestInterface.cpp:
1976         (WebCore::TestInterfaceV8Internal::supplementalMethod3Callback):
1977         (TestInterfaceV8Internal):
1978         (WebCore):
1979         * bindings/scripts/test/V8/V8TestObj.cpp:
1980         (WebCore::TestObjV8Internal::customMethodCallback):
1981         (TestObjV8Internal):
1982         (WebCore::TestObjV8Internal::customMethodWithArgsCallback):
1983         (WebCore::TestObjV8Internal::classMethod2Callback):
1984         (WebCore):
1985         (WebCore::ConfigureV8TestObjTemplate):
1986         * bindings/scripts/test/V8/V8TestObj.h:
1987         (V8TestObj):
1988         * bindings/v8/custom/V8ClipboardCustom.cpp:
1989         (WebCore::V8Clipboard::clearDataCallbackCustom):
1990         (WebCore::V8Clipboard::setDragImageCallbackCustom):
1991         * bindings/v8/custom/V8ConsoleCustom.cpp:
1992         (WebCore::V8Console::traceCallbackCustom):
1993         (WebCore::V8Console::assertCallbackCustom):
1994         (WebCore::V8Console::profileCallbackCustom):
1995         (WebCore::V8Console::profileEndCallbackCustom):
1996         * bindings/v8/custom/V8CryptoCustom.cpp:
1997         (WebCore::V8Crypto::getRandomValuesCallbackCustom):
1998         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1999         (WebCore::V8DOMFormData::appendCallbackCustom):
2000         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2001         (WebCore::V8DOMWindow::addEventListenerCallbackCustom):
2002         (WebCore::V8DOMWindow::removeEventListenerCallbackCustom):
2003         (WebCore::V8DOMWindow::postMessageCallbackCustom):
2004         (WebCore::V8DOMWindow::toStringCallbackCustom):
2005         (WebCore::V8DOMWindow::releaseEventsCallbackCustom):
2006         (WebCore::V8DOMWindow::captureEventsCallbackCustom):
2007         (WebCore::V8DOMWindow::showModalDialogCallbackCustom):
2008         (WebCore::V8DOMWindow::openCallbackCustom):
2009         (WebCore::V8DOMWindow::setTimeoutCallbackCustom):
2010         (WebCore::V8DOMWindow::setIntervalCallbackCustom):
2011         * bindings/v8/custom/V8DataViewCustom.cpp:
2012         (WebCore::V8DataView::getInt8CallbackCustom):
2013         (WebCore::V8DataView::getUint8CallbackCustom):
2014         (WebCore::V8DataView::setInt8CallbackCustom):
2015         (WebCore::V8DataView::setUint8CallbackCustom):
2016         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
2017         (WebCore::V8DedicatedWorkerContext::postMessageCallbackCustom):
2018         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
2019         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallbackCustom):
2020         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2021         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallbackCustom):
2022         * bindings/v8/custom/V8DocumentCustom.cpp:
2023         (WebCore::V8Document::evaluateCallbackCustom):
2024         (WebCore::V8Document::createTouchListCallbackCustom):
2025         * bindings/v8/custom/V8GeolocationCustom.cpp:
2026         (WebCore::V8Geolocation::getCurrentPositionCallbackCustom):
2027         (WebCore::V8Geolocation::watchPositionCallbackCustom):
2028         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
2029         (WebCore::V8HTMLAllCollection::itemCallbackCustom):
2030         (WebCore::V8HTMLAllCollection::namedItemCallbackCustom):
2031         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2032         (WebCore::V8HTMLCanvasElement::getContextCallbackCustom):
2033         (WebCore::V8HTMLCanvasElement::toDataURLCallbackCustom):
2034         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2035         (WebCore::V8HTMLDocument::writeCallbackCustom):
2036         (WebCore::V8HTMLDocument::writelnCallbackCustom):
2037         (WebCore::V8HTMLDocument::openCallbackCustom):
2038         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
2039         (WebCore::V8HTMLFormControlsCollection::namedItemCallbackCustom):
2040         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2041         (WebCore::v8HTMLImageElementConstructorCallbackCustom):
2042         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2043         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
2044         (WebCore::V8HTMLInputElement::setSelectionRangeCallbackCustom):
2045         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2046         (WebCore::V8HTMLOptionsCollection::namedItemCallbackCustom):
2047         (WebCore::V8HTMLOptionsCollection::removeCallbackCustom):
2048         (WebCore::V8HTMLOptionsCollection::addCallbackCustom):
2049         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
2050         (WebCore::V8HTMLSelectElement::removeCallbackCustom):
2051         * bindings/v8/custom/V8HistoryCustom.cpp:
2052         (WebCore::V8History::pushStateCallbackCustom):
2053         (WebCore::V8History::replaceStateCallbackCustom):
2054         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2055         (WebCore::V8InjectedScriptHost::inspectedObjectCallbackCustom):
2056         (WebCore::V8InjectedScriptHost::internalConstructorNameCallbackCustom):
2057         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallbackCustom):
2058         (WebCore::V8InjectedScriptHost::typeCallbackCustom):
2059         (WebCore::V8InjectedScriptHost::functionDetailsCallbackCustom):
2060         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallbackCustom):
2061         (WebCore::V8InjectedScriptHost::getEventListenersCallbackCustom):
2062         (WebCore::V8InjectedScriptHost::inspectCallbackCustom):
2063         (WebCore::V8InjectedScriptHost::databaseIdCallbackCustom):
2064         (WebCore::V8InjectedScriptHost::storageIdCallbackCustom):
2065         (WebCore::V8InjectedScriptHost::evaluateCallbackCustom):
2066         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallbackCustom):
2067         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2068         (WebCore::V8InspectorFrontendHost::platformCallbackCustom):
2069         (WebCore::V8InspectorFrontendHost::portCallbackCustom):
2070         (WebCore::V8InspectorFrontendHost::showContextMenuCallbackCustom):
2071         (WebCore::V8InspectorFrontendHost::recordActionTakenCallbackCustom):
2072         (WebCore::V8InspectorFrontendHost::recordPanelShownCallbackCustom):
2073         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallbackCustom):
2074         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2075         (WebCore::V8JavaScriptCallFrame::evaluateCallbackCustom):
2076         (WebCore::V8JavaScriptCallFrame::restartCallbackCustom):
2077         (WebCore::V8JavaScriptCallFrame::setVariableValueCallbackCustom):
2078         (WebCore::V8JavaScriptCallFrame::scopeTypeCallbackCustom):
2079         * bindings/v8/custom/V8LocationCustom.cpp:
2080         (WebCore::V8Location::reloadAccessorGetter):
2081         (WebCore::V8Location::replaceAccessorGetter):
2082         (WebCore::V8Location::assignAccessorGetter):
2083         (WebCore::V8Location::reloadCallbackCustom):
2084         (WebCore::V8Location::replaceCallbackCustom):
2085         (WebCore::V8Location::assignCallbackCustom):
2086         (WebCore::V8Location::valueOfCallbackCustom):
2087         (WebCore::V8Location::toStringCallbackCustom):
2088         * bindings/v8/custom/V8MessageEventCustom.cpp:
2089         (WebCore::V8MessageEvent::initMessageEventCallbackCustom):
2090         (WebCore::V8MessageEvent::webkitInitMessageEventCallbackCustom):
2091         * bindings/v8/custom/V8MessagePortCustom.cpp:
2092         (WebCore::V8MessagePort::postMessageCallbackCustom):
2093         * bindings/v8/custom/V8NodeCustom.cpp:
2094         (WebCore::V8Node::insertBeforeCallbackCustom):
2095         (WebCore::V8Node::replaceChildCallbackCustom):
2096         (WebCore::V8Node::removeChildCallbackCustom):
2097         (WebCore::V8Node::appendChildCallbackCustom):
2098         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
2099         (WebCore::V8NotificationCenter::requestPermissionCallbackCustom):
2100         * bindings/v8/custom/V8NotificationCustom.cpp:
2101         (WebCore::V8Notification::requestPermissionCallbackCustom):
2102         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
2103         (WebCore::V8SQLResultSetRowList::itemCallbackCustom):
2104         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2105         (WebCore::V8SQLTransaction::executeSqlCallbackCustom):
2106         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2107         (WebCore::V8SQLTransactionSync::executeSqlCallbackCustom):
2108         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2109         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallbackCustom):
2110         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2111         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallbackCustom):
2112         (WebCore::V8WebGLRenderingContext::getBufferParameterCallbackCustom):
2113         (WebCore::V8WebGLRenderingContext::getExtensionCallbackCustom):
2114         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallbackCustom):
2115         (WebCore::V8WebGLRenderingContext::getParameterCallbackCustom):
2116         (WebCore::V8WebGLRenderingContext::getProgramParameterCallbackCustom):
2117         (WebCore::V8WebGLRenderingContext::getRenderbufferParameterCallbackCustom):
2118         (WebCore::V8WebGLRenderingContext::getShaderParameterCallbackCustom):
2119         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallbackCustom):
2120         (WebCore::V8WebGLRenderingContext::getTexParameterCallbackCustom):
2121         (WebCore::V8WebGLRenderingContext::getUniformCallbackCustom):
2122         (WebCore::V8WebGLRenderingContext::getVertexAttribCallbackCustom):
2123         (WebCore::V8WebGLRenderingContext::uniform1fvCallbackCustom):
2124         (WebCore::V8WebGLRenderingContext::uniform1ivCallbackCustom):
2125         (WebCore::V8WebGLRenderingContext::uniform2fvCallbackCustom):
2126         (WebCore::V8WebGLRenderingContext::uniform2ivCallbackCustom):
2127         (WebCore::V8WebGLRenderingContext::uniform3fvCallbackCustom):
2128         (WebCore::V8WebGLRenderingContext::uniform3ivCallbackCustom):
2129         (WebCore::V8WebGLRenderingContext::uniform4fvCallbackCustom):
2130         (WebCore::V8WebGLRenderingContext::uniform4ivCallbackCustom):
2131         (WebCore::V8WebGLRenderingContext::uniformMatrix2fvCallbackCustom):
2132         (WebCore::V8WebGLRenderingContext::uniformMatrix3fvCallbackCustom):
2133         (WebCore::V8WebGLRenderingContext::uniformMatrix4fvCallbackCustom):
2134         (WebCore::V8WebGLRenderingContext::vertexAttrib1fvCallbackCustom):
2135         (WebCore::V8WebGLRenderingContext::vertexAttrib2fvCallbackCustom):
2136         (WebCore::V8WebGLRenderingContext::vertexAttrib3fvCallbackCustom):
2137         (WebCore::V8WebGLRenderingContext::vertexAttrib4fvCallbackCustom):
2138         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2139         (WebCore::V8WorkerContext::importScriptsCallbackCustom):
2140         (WebCore::V8WorkerContext::setTimeoutCallbackCustom):
2141         (WebCore::V8WorkerContext::setIntervalCallbackCustom):
2142         * bindings/v8/custom/V8WorkerCustom.cpp:
2143         (WebCore::V8Worker::postMessageCallbackCustom):
2144         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2145         (WebCore::V8XMLHttpRequest::openCallbackCustom):
2146         (WebCore::V8XMLHttpRequest::sendCallbackCustom):
2147         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
2148         (WebCore::V8XSLTProcessor::setParameterCallbackCustom):
2149         (WebCore::V8XSLTProcessor::getParameterCallbackCustom):
2150         (WebCore::V8XSLTProcessor::removeParameterCallbackCustom):
2151
2152 2013-02-13  Praveen R Jadhav  <praveen.j@samsung.com>
2153
2154         JSObject for ChannelSplitterNode and ChannelMergerNode are not created.
2155         https://bugs.webkit.org/show_bug.cgi?id=109542
2156
2157         Reviewed by Kentaro Hara.
2158
2159         "JSGenerateToJSObject" should be included in IDL files
2160         of ChannelSplitterNode and ChannelMergerNode in WebAudio.
2161         This ensures html files to access corresponding objects.
2162
2163         * Modules/webaudio/ChannelMergerNode.idl:
2164         * Modules/webaudio/ChannelSplitterNode.idl:
2165
2166 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
2167
2168         [Regression] After r142831  collection-null-like-arguments.html layout test failing
2169         https://bugs.webkit.org/show_bug.cgi?id=109780
2170
2171         Reviewed by Kentaro Hara.
2172
2173         No new tests. LayoutTests/fast/dom/collection-null-like-arguments.html
2174         Should pass now.
2175
2176         * bindings/js/JSHTMLAllCollectionCustom.cpp: Return null for namedItem() only.
2177         (WebCore::getNamedItems):
2178         (WebCore::JSHTMLAllCollection::namedItem):
2179         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
2180         (WebCore::getNamedItems):
2181         (WebCore::JSHTMLFormControlsCollection::namedItem):
2182         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
2183         (WebCore::getNamedItems):
2184         (WebCore::JSHTMLOptionsCollection::namedItem):
2185
2186 2013-02-13  Soo-Hyun Choi  <sh9.choi@samsung.com>
2187
2188         Fix indentation error in MediaPlayerPrivateGStreamer.h
2189         https://bugs.webkit.org/show_bug.cgi?id=109768
2190
2191         Reviewed by Kentaro Hara.
2192
2193         No new tests as this patch just changes indentation style.
2194
2195         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2196         (MediaPlayerPrivateGStreamer):
2197         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
2198         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
2199         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
2200         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
2201
2202 2013-02-13  Adam Barth  <abarth@webkit.org>
2203
2204         TokenPreloadScanner should be (mostly!) thread-safe
2205         https://bugs.webkit.org/show_bug.cgi?id=109760
2206
2207         Reviewed by Eric Seidel.
2208
2209         This patch makes the bulk of TokenPreloadScanner thread-safe.  The one
2210         remaining wart is processPossibleBaseTag because it wants to grub
2211         around in the base tag's attributes. I have a plan for that, but it's
2212         going to need to wait for the next patch.
2213
2214         * html/parser/HTMLPreloadScanner.cpp:
2215         (WebCore::isStartTag):
2216         (WebCore::isStartOrEndTag):
2217         (WebCore::TokenPreloadScanner::identifierFor):
2218         (WebCore::TokenPreloadScanner::inititatorFor):
2219         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
2220         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2221         (TokenPreloadScanner::StartTagScanner):
2222         (WebCore::TokenPreloadScanner::processPossibleTemplateTag):
2223         (WebCore::TokenPreloadScanner::processPossibleStyleTag):
2224         (WebCore::TokenPreloadScanner::processPossibleBaseTag):
2225         (WebCore::TokenPreloadScanner::scan):
2226         (WebCore::HTMLPreloadScanner::scan):
2227         * html/parser/HTMLPreloadScanner.h:
2228         (WebCore):
2229
2230 2013-02-13  Adam Barth  <abarth@webkit.org>
2231
2232         StartTagScanner should be thread-safe
2233         https://bugs.webkit.org/show_bug.cgi?id=109750
2234
2235         Reviewed by Eric Seidel.
2236
2237         This patch weens the StartTagScanner off AtomicString using two
2238         techniques:
2239
2240         1) This patch creates an enum to represent the four tag names that the
2241            StartTagScanner needs to understand. Using an enum is better than
2242            using an AtomicString because we can use the enum on both the main
2243            thread and on the background thread.
2244
2245         2) For attributes, this patch uses threadSafeMatch. We're not able to
2246            use threadSafeMatch everywhere due to performance, but using it for
2247            attributes appears to be ok becaues we only call threadSafeMatch on
2248            the attributes of "interesting" tags.
2249
2250         I tested the performance of this patch using
2251         PerformanceTests/Parser/html-parser.html and did not see any slowdown.
2252         (There actually appeared to be a <1% speedup, but I'm attributing that
2253         to noise.)
2254
2255         * html/parser/HTMLPreloadScanner.cpp:
2256         (WebCore::identifierFor):
2257         (WebCore):
2258         (WebCore::inititatorFor):
2259         (WebCore::StartTagScanner::StartTagScanner):
2260         (WebCore::StartTagScanner::processAttributes):
2261         (StartTagScanner):
2262         (WebCore::StartTagScanner::createPreloadRequest):
2263         (WebCore::StartTagScanner::processAttribute):
2264         (WebCore::StartTagScanner::charset):
2265         (WebCore::StartTagScanner::resourceType):
2266         (WebCore::StartTagScanner::shouldPreload):
2267         (WebCore::HTMLPreloadScanner::processToken):
2268
2269 2013-02-13  Huang Dongsung  <luxtella@company100.net>
2270
2271         Coordinated Graphics: a long page is scaled vertically while loading.
2272         https://bugs.webkit.org/show_bug.cgi?id=109645
2273
2274         Reviewed by Noam Rosenthal.
2275
2276         When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
2277         vertically scaled contents. It is because there is the difference between the
2278         size of a layer and the size of CoordinatedBackingStore.
2279
2280         Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
2281         at the moment of creating, updating and removing a tile. However, it is not
2282         necessary to send tile-related messages when the size of layer is changed.
2283         So this patch resets the size of CoordinatedBackingStore when receiving the
2284         message that is created when the size is changed: SyncLayerState.
2285
2286         There is no current way to reliably test flicker issues.
2287
2288         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
2289           Add m_pendingSize to set m_size at the moment of flushing.
2290           After http://webkit.org/b/108294, m_pendingSize will be removed
2291           because the bug makes CoordinatedGraphicsScene execute all messages at
2292           the moment of flushing.
2293         (WebCore::CoordinatedBackingStore::setSize):
2294         (WebCore::CoordinatedBackingStore::commitTileOperations):
2295         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
2296         (CoordinatedBackingStore):
2297         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2298         (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
2299         (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
2300         (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
2301         (WebCore::CoordinatedGraphicsScene::createTile):
2302         (WebCore::CoordinatedGraphicsScene::removeTile):
2303         (WebCore::CoordinatedGraphicsScene::updateTile):
2304
2305 2013-02-13  Kentaro Hara  <haraken@chromium.org>
2306
2307         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
2308         and XXXAccessorSetter() to XXXAttrSetterCustom()
2309         https://bugs.webkit.org/show_bug.cgi?id=109679
2310
2311         Reviewed by Adam Barth.
2312
2313         For naming consistency and clarification.
2314
2315         No tests. No change in behavior.
2316
2317         * bindings/scripts/CodeGeneratorV8.pm:
2318         (GenerateHeader):
2319         (GenerateHeaderCustomCall):
2320         (GenerateNormalAttrGetter):
2321         (GenerateNormalAttrSetter):
2322         (GenerateImplementation):
2323         * bindings/scripts/test/V8/V8TestInterface.cpp:
2324         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
2325         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
2326         * bindings/scripts/test/V8/V8TestObj.cpp:
2327         (WebCore::TestObjV8Internal::customAttrAttrGetter):
2328         (WebCore::TestObjV8Internal::customAttrAttrSetter):
2329         * bindings/scripts/test/V8/V8TestObj.h:
2330         (V8TestObj):
2331         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
2332         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
2333         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
2334         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
2335         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
2336         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
2337         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
2338         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
2339         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
2340         * bindings/v8/custom/V8ClipboardCustom.cpp:
2341         (WebCore::V8Clipboard::typesAttrGetterCustom):
2342         * bindings/v8/custom/V8CoordinatesCustom.cpp:
2343         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
2344         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
2345         (WebCore::V8Coordinates::headingAttrGetterCustom):
2346         (WebCore::V8Coordinates::speedAttrGetterCustom):
2347         * bindings/v8/custom/V8CustomEventCustom.cpp:
2348         (WebCore::V8CustomEvent::detailAttrGetterCustom):
2349         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2350         (WebCore::V8DOMWindow::eventAttrGetterCustom):
2351         (WebCore::V8DOMWindow::eventAttrSetterCustom):
2352         (WebCore::V8DOMWindow::locationAttrSetterCustom):
2353         (WebCore::V8DOMWindow::openerAttrSetterCustom):
2354         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
2355         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
2356         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
2357         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
2358         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
2359         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2360         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
2361         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
2362         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
2363         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
2364         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
2365         (WebCore::V8Document::locationAttrGetterCustom):
2366         (WebCore::V8Document::locationAttrSetterCustom):
2367         * bindings/v8/custom/V8EventCustom.cpp:
2368         (WebCore::V8Event::dataTransferAttrGetterCustom):
2369         (WebCore::V8Event::clipboardDataAttrGetterCustom):
2370         * bindings/v8/custom/V8FileReaderCustom.cpp:
2371         (WebCore::V8FileReader::resultAttrGetterCustom):
2372         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2373         (WebCore::V8HTMLDocument::allAttrSetterCustom):
2374         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2375         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
2376         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
2377         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
2378         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
2379         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
2380         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
2381         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
2382         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
2383         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
2384         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
2385         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
2386         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
2387         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
2388         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
2389         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
2390         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
2391         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2392         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
2393         * bindings/v8/custom/V8HistoryCustom.cpp:
2394         (WebCore::V8History::stateAttrGetterCustom):
2395         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2396         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
2397         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
2398         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
2399         * bindings/v8/custom/V8LocationCustom.cpp:
2400         (WebCore::V8Location::hashAttrSetterCustom):
2401         (WebCore::V8Location::hostAttrSetterCustom):
2402         (WebCore::V8Location::hostnameAttrSetterCustom):
2403         (WebCore::V8Location::hrefAttrSetterCustom):
2404         (WebCore::V8Location::pathnameAttrSetterCustom):
2405         (WebCore::V8Location::portAttrSetterCustom):
2406         (WebCore::V8Location::protocolAttrSetterCustom):
2407         (WebCore::V8Location::searchAttrSetterCustom):
2408         (WebCore::V8Location::reloadAttrGetterCustom):
2409         (WebCore::V8Location::replaceAttrGetterCustom):
2410         (WebCore::V8Location::assignAttrGetterCustom):
2411         * bindings/v8/custom/V8MessageEventCustom.cpp:
2412         (WebCore::V8MessageEvent::dataAttrGetterCustom):
2413         (WebCore::V8MessageEvent::portsAttrGetterCustom):
2414         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
2415         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
2416         * bindings/v8/custom/V8PannerNodeCustom.cpp:
2417         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
2418         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
2419         * bindings/v8/custom/V8PopStateEventCustom.cpp:
2420         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
2421         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2422         (WebCore::V8SVGLength::valueAttrGetterCustom):
2423         (WebCore::V8SVGLength::valueAttrSetterCustom):
2424         * bindings/v8/custom/V8TrackEventCustom.cpp:
2425         (WebCore::V8TrackEvent::trackAttrGetterCustom):
2426         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
2427         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
2428         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2429         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
2430         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
2431
2432 2013-02-12  Kentaro Hara  <haraken@chromium.org>
2433
2434         [V8] Generate wrapper methods for custom getters/setters
2435         https://bugs.webkit.org/show_bug.cgi?id=109666
2436
2437         Reviewed by Adam Barth.
2438
2439         Currently V8 directly calls back custom getters/setters written
2440         in custom binding files. This makes it impossible for code generators
2441         to hook custom getters/setters (e.g. Code generators cannot insert a code
2442         for FeatureObservation into custom getters/setters). To solve the problem,
2443         we should generate wrapper methods for custom getters/setters.
2444
2445         No tests. No change in behavior.
2446
2447         * bindings/scripts/CodeGeneratorV8.pm:
2448         (GenerateNormalAttrGetter):
2449         (GenerateNormalAttrSetter):
2450         (GenerateSingleBatchedAttribute):
2451         (GenerateImplementation):
2452         * bindings/scripts/test/V8/V8TestInterface.cpp:
2453         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
2454         (TestInterfaceV8Internal):
2455         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
2456         (WebCore):
2457         * bindings/scripts/test/V8/V8TestObj.cpp:
2458         (WebCore::TestObjV8Internal::customAttrAttrGetter):
2459         (TestObjV8Internal):
2460         (WebCore::TestObjV8Internal::customAttrAttrSetter):
2461         (WebCore):
2462
2463 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
2464
2465         HTMLCollections namedItem() methods should return null than undefined for empty collections.
2466         https://bugs.webkit.org/show_bug.cgi?id=104096
2467
2468         Reviewed by Kentaro Hara.
2469
2470         As per specification namedItem() should return null if collection is empty.
2471         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
2472
2473         Test: fast/dom/htmlcollection-namedItem.html
2474
2475         * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null.
2476         (WebCore::getNamedItems):
2477         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
2478         (WebCore::getNamedItems):
2479         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
2480         (WebCore::getNamedItems):
2481         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto.
2482         (WebCore::V8HTMLAllCollection::namedItemCallback):
2483         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto.
2484         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
2485         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto.
2486         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
2487
2488 2013-02-13  Tony Gentilcore  <tonyg@chromium.org>
2489
2490         Fix svg/in-html/script-write.html with threaded HTML parser
2491         https://bugs.webkit.org/show_bug.cgi?id=109495
2492
2493         Reviewed by Eric Seidel.
2494
2495         This patch makes the background parser's simulateTreeBuilder() more realistic.
2496         1. The HTMLTreeBuilder does not call the updateStateFor() setState()s when in foreign content mode so we shouldn't do it when simulating the tree builder.
2497         2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
2498         3. Support the <foreignObject> tag which enters and leaves foreign content mode.
2499         4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
2500
2501         This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
2502         We are in foreign content if the topmost namespace is SVG or MathML.
2503
2504         This fixes svg/in-html/script-write.html and likely others.
2505
2506         * html/parser/BackgroundHTMLParser.cpp:
2507         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
2508         * html/parser/BackgroundHTMLParser.h:
2509         (BackgroundHTMLParser):
2510         * html/parser/CompactHTMLToken.cpp:
2511         (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
2512         (WebCore):
2513         * html/parser/CompactHTMLToken.h:
2514         (WebCore):
2515         (CompactHTMLToken):
2516
2517 2013-02-13  Andreas Kling  <akling@apple.com>
2518
2519         Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
2520         <http://webkit.org/b/109756>
2521
2522         Reviewed by Antti Koivisto.
2523
2524         Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
2525         There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
2526         objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
2527
2528         Small progression on Membuster3, mostly for peace of mind.
2529
2530         * dom/Attr.cpp:
2531         (WebCore::Attr::elementAttribute):
2532         * dom/Element.h:
2533         (Element):
2534         * html/HTMLInputElement.cpp:
2535         (WebCore::HTMLInputElement::updateType):
2536         * html/HTMLSelectElement.cpp:
2537         (WebCore::HTMLSelectElement::parseAttribute):
2538         * svg/SVGStyledElement.cpp:
2539         (WebCore::SVGStyledElement::getPresentationAttribute):
2540
2541 2013-02-13  Andreas Kling  <akling@apple.com>
2542
2543         Stronger ElementData pointer typing.
2544         <http://webkit.org/b/109752>
2545
2546         Reviewed by Antti Koivisto.
2547
2548         Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
2549         where possible. Moved some methods from base class into leaf classes that don't make sense
2550         for both classes.
2551
2552         * dom/DocumentSharedObjectPool.cpp:
2553         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
2554         (ShareableElementDataCacheEntry):
2555         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
2556         * dom/DocumentSharedObjectPool.h:
2557         (DocumentSharedObjectPool):
2558         * dom/Element.cpp:
2559         (WebCore::Element::parserSetAttributes):
2560         (WebCore::Element::setAttributeNode):
2561         (WebCore::Element::removeAttributeInternal):
2562         (WebCore::Element::cloneAttributesFromElement):
2563         (WebCore::Element::createUniqueElementData):
2564         (WebCore::ShareableElementData::createWithAttributes):
2565         (WebCore::UniqueElementData::create):
2566         (WebCore::ElementData::makeUniqueCopy):
2567         (WebCore::UniqueElementData::makeShareableCopy):
2568         * dom/Element.h:
2569         (ElementData):
2570         (ShareableElementData):
2571         (UniqueElementData):
2572         (Element):
2573         (WebCore::Element::ensureUniqueElementData):
2574         * dom/StyledElement.cpp:
2575         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2576
2577 2013-02-13  Antti Koivisto  <antti@apple.com>
2578
2579         Reschedule shared CFRunLoopTimer instead of reconstructing it
2580         https://bugs.webkit.org/show_bug.cgi?id=109765
2581
2582         Reviewed by Andreas Kling and Anders Carlsson.
2583
2584         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
2585
2586         * platform/mac/SharedTimerMac.mm:
2587         (WebCore):
2588         (WebCore::PowerObserver::restartSharedTimer):
2589         (WebCore::sharedTimer):
2590         (WebCore::setSharedTimerFireInterval):
2591         (WebCore::stopSharedTimer):
2592
2593 2013-02-13  Emil A Eklund  <eae@chromium.org>
2594
2595         getComputedStyle returns truncated value for margin-right
2596         https://bugs.webkit.org/show_bug.cgi?id=109759
2597
2598         Reviewed by Tony Chang.
2599         
2600         Due to an unfortunate cast in CSSComputedStyleDeclaration::
2601         getPropertyCSSValue getComputedStyle returns truncated styles
2602         for margin-right in cases where it isn't set to a specific pixel
2603         value.
2604
2605         Test: fast/sub-pixel/computedstylemargin.html
2606
2607         * css/CSSComputedStyleDeclaration.cpp:
2608         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2609         Change type of temporary value variable to float to prevent loss of precision.
2610
2611 2013-02-13  Max Vujovic  <mvujovic@adobe.com>
2612
2613         [CSS Filters] Refactor filter outsets into a class
2614         https://bugs.webkit.org/show_bug.cgi?id=109330
2615
2616         Reviewed by Dean Jackson.
2617
2618         In filters related code, we're often operating on 4 ints representing the top, right,
2619         bottom, and left filter outsets. These outsets come from a filter like blur or drop-shadow.
2620         This patch packages those ints and their related operations into a class called
2621         IntRectExtent.
2622
2623         Here are some signs that we should make a class to hold those 4 ints:
2624         1) In RenderLayer.cpp, we have a expandRectForFilterOutsets function, which looks like
2625            feature envy.
2626         2) RenderStyle and other classes have methods like getFilterOutsets which set the 4 ints by
2627            reference. The calling code has to define 4 ints, which looks bloated.
2628         3) To fix bug 109098, we will need to check if filter outsets changed, which sounds like a
2629            nice job for an inequality operator. (https://bugs.webkit.org/show_bug.cgi?id=109098)
2630
2631         No new tests. No change in behavior. Just refactoring.
2632
2633         * GNUmakefile.list.am:
2634         * Target.pri:
2635         * WebCore.gypi:
2636         * WebCore.xcodeproj/project.pbxproj:
2637         * platform/graphics/IntRectExtent.h: Added.
2638         (WebCore):
2639         (IntRectExtent):
2640         (WebCore::IntRectExtent::IntRectExtent):
2641         (WebCore::IntRectExtent::top):
2642         (WebCore::IntRectExtent::setTop):
2643         (WebCore::IntRectExtent::right):
2644         (WebCore::IntRectExtent::setRight):
2645         (WebCore::IntRectExtent::bottom):
2646         (WebCore::IntRectExtent::setBottom):
2647         (WebCore::IntRectExtent::left):
2648         (WebCore::IntRectExtent::setLeft):
2649         (WebCore::IntRectExtent::expandRect):
2650         (WebCore::IntRectExtent::isZero):
2651         (WebCore::operator==):
2652         (WebCore::operator!=):
2653         (WebCore::operator+=):
2654         * platform/graphics/filters/FilterOperations.cpp:
2655         (WebCore::FilterOperations::outsets):
2656         * platform/graphics/filters/FilterOperations.h:
2657         (FilterOperations):
2658         * platform/graphics/texmap/TextureMapperLayer.cpp:
2659         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
2660         * rendering/FilterEffectRenderer.cpp:
2661         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
2662         (WebCore::FilterEffectRenderer::build):
2663         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
2664         * rendering/FilterEffectRenderer.h:
2665         (FilterEffectRenderer):
2666         * rendering/RenderLayer.cpp:
2667         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
2668         (WebCore::transparencyClipBox):
2669         (WebCore::RenderLayer::calculateLayerBounds):
2670         * rendering/style/RenderStyle.h:
2671
2672 2013-02-13  Adam Barth  <abarth@webkit.org>
2673
2674         Factor HTMLTokenScanner out of HTMLPreloadScanner
2675         https://bugs.webkit.org/show_bug.cgi?id=109754
2676
2677         Reviewed by Eric Seidel.
2678
2679         This patch is just a mechanical separation of the per-token "scanning"
2680         logic from HTMLPreloadScanner into a separate class.
2681         HTMLPreloadScanner's job is now to keep track of the input stream and
2682         to pump the tokenizer.
2683
2684         This factorization class will let us use HTMLTokenScanner on the
2685         background thread (once we finish making it thread-safe). In a follow
2686         up patch, I'll move HTMLTokenScanner to its own file.
2687
2688         * html/parser/HTMLPreloadScanner.cpp:
2689         (WebCore::HTMLTokenScanner::HTMLTokenScanner):
2690         (WebCore::HTMLTokenScanner::~HTMLTokenScanner):
2691         (WebCore::HTMLTokenScanner::processPossibleTemplateTag):
2692         (WebCore::HTMLTokenScanner::processPossibleStyleTag):
2693         (WebCore::HTMLTokenScanner::processPossibleBaseTag):
2694         (WebCore::HTMLTokenScanner::scan):
2695         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
2696         (WebCore):
2697         (WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
2698         (WebCore::HTMLPreloadScanner::appendToEnd):
2699         (WebCore::HTMLPreloadScanner::scan):
2700         * html/parser/HTMLPreloadScanner.h:
2701         (HTMLTokenScanner):
2702         (WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
2703         (HTMLPreloadScanner):
2704         (WebCore):
2705
2706 2013-02-13  Elliott Sprehn  <esprehn@chromium.org>
2707
2708         ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
2709         https://bugs.webkit.org/show_bug.cgi?id=109616
2710
2711         Reviewed by Julien Chaffraix.
2712
2713         Test: fast/css-generated-content/quote-layout-focus-crash.html
2714
2715         In some cases RenderQuote may mark itself and containing blocks as needing layout
2716         during a layout, but then one of it's containing blocks will mark itself as having
2717         finished layout so the RenderQuote and potentially some of it's ancestor renderers
2718         needLayout(), but the ancestors above those do not.
2719
2720         Until we have proper pre-layout tasks we should just walk the list of quotes
2721         right before layout and mark all their ancestors as needing layout if the quote
2722         needs layout.
2723
2724         * dom/Document.cpp:
2725         (WebCore::Document::updateLayout): Call markQuoteContainingBlocksForLayoutIfNeeded.
2726         (WebCore::Document::implicitClose): Call markQuoteContainingBlocksForLayoutIfNeeded.
2727         * rendering/RenderQuote.h:
2728         (WebCore::RenderQuote::next): Added.
2729         * rendering/RenderView.cpp:
2730         (WebCore::RenderView::markQuoteContainingBlocksForLayoutIfNeeded): Added.
2731         * rendering/RenderView.h:
2732         (RenderView):
2733
2734 2013-02-13  Jer Noble  <jer.noble@apple.com>
2735
2736         EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
2737         https://bugs.webkit.org/show_bug.cgi?id=109701
2738
2739         Reviewed by Eric Carlson.
2740
2741         Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
2742         results in no event listener being triggered. Return a bool (like the
2743         v1 equivalent keyNeeded method) to indicate this.
2744
2745         * html/HTMLMediaElement.cpp:
2746         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
2747         * html/HTMLMediaElement.h:
2748         * platform/graphics/MediaPlayer.cpp:
2749         (WebCore::MediaPlayer::keyNeeded):
2750         * platform/graphics/MediaPlayer.h:
2751         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
2752
2753 2013-02-13  Abhishek Arya  <inferno@chromium.org>
2754
2755         ASSERTION FAILED: !object || object->isBox(), Bad cast in RenderBox::computeLogicalHeight
2756         https://bugs.webkit.org/show_bug.cgi?id=107748
2757
2758         Reviewed by Levi Weintraub.
2759
2760         Make sure that body renderer is not an inline-block display
2761         when determining that it stretches to viewport or when paginated
2762         content needs base height.
2763
2764         Test: fast/block/body-inline-block-crash.html
2765
2766         * rendering/RenderBox.cpp:
2767         (WebCore::RenderBox::computeLogicalHeight):
2768         * rendering/RenderBox.h:
2769         (WebCore::RenderBox::stretchesToViewport):
2770
2771 2013-02-13  Shawn Singh  <shawnsingh@chromium.org>
2772
2773         Fix debug assertion being triggered because we may access dirty normalFlowList.
2774         https://bugs.webkit.org/show_bug.cgi?id=109740
2775
2776         A debug assertion in RenderLayer.h is being hit when trying to
2777         access the normalFlowList when it is dirty.  This is caused by a
2778         new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(),
2779         but I overlooked the need to call updateLayerListsIfNeeded()
2780         recursively as well.
2781
2782         Reviewed by Simon Fraser.
2783
2784         No test, because there's no reliable way to test this (same as bug 85512).
2785
2786         * rendering/RenderLayerBacking.cpp:
2787         (WebCore::hasVisibleNonCompositingDescendant):
2788         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
2789
2790 2013-02-13  Antti Koivisto  <antti@apple.com>
2791
2792         Don't restart shared timer if both the current and the new fire time are in the past
2793         https://bugs.webkit.org/show_bug.cgi?id=109731
2794
2795         Reviewed by Andreas Kling.
2796
2797         In 40-50% of cases we reschedule the shared timer both the old and the new fire time have already passed. This can happen at least when rescheduling 
2798         a zero duration timer and when stopping a timer that was ready to fire.
2799
2800         We can skip rescheduling in this case, the shared timer will fire immediately anyway.
2801         
2802         Scheduling timers calls into platform layer and can be slow. This about halves the time under setSharedTimerFireInterval in PLT3
2803         for ~0.1% total CPU time reduction.
2804
2805         * platform/ThreadTimers.cpp:
2806         (WebCore::ThreadTimers::ThreadTimers):
2807         (WebCore::ThreadTimers::setSharedTimer):
2808         (WebCore::ThreadTimers::updateSharedTimer):
2809         (WebCore::ThreadTimers::sharedTimerFiredInternal):
2810         * platform/ThreadTimers.h:
2811         (ThreadTimers):
2812
2813 2013-02-13  Zan Dobersek  <zdobersek@igalia.com>
2814
2815         The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
2816         https://bugs.webkit.org/show_bug.cgi?id=109325
2817
2818         Reviewed by Anders Carlsson.
2819
2820         Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
2821         two methods as they're provided by the C++ standard library being used.
2822
2823         No new tests as there's no change in functionality.
2824
2825         * Modules/mediasource/MediaSource.cpp:
2826         (WebCore::MediaSource::setDuration):
2827         * Modules/webaudio/AudioBufferSourceNode.cpp:
2828         (WebCore::AudioBufferSourceNode::totalPitchRate):
2829         * Modules/webaudio/AudioParam.cpp:
2830         (WebCore::AudioParam::setValue):
2831         * Modules/webaudio/AudioParamTimeline.cpp:
2832         (WebCore::isValidNumber):
2833         * Modules/webaudio/PannerNode.cpp:
2834         (WebCore::fixNANs):
2835         * bindings/js/IDBBindingUtilities.cpp:
2836         (WebCore::createIDBKeyFromValue):
2837         * bindings/js/JSDataViewCustom.cpp:
2838         (WebCore::getDataViewMember):
2839         * bindings/js/JSGeolocationCustom.cpp:
2840         (WebCore::setTimeout):
2841         (WebCore::setMaximumAge):
2842         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2843         (WebCore::JSHTMLOptionsCollection::setLength):
2844         * bindings/js/JSWebKitPointCustom.cpp:
2845         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
2846         * bindings/scripts/CodeGeneratorJS.pm:
2847         (GenerateImplementation):
2848         (GenerateParametersCheck):
2849         * bindings/scripts/CodeGeneratorV8.pm:
2850         (GenerateParametersCheck):
2851         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2852         (WebCore::JSFloat64Array::getByIndex):
2853         * bindings/scripts/test/JS/JSTestObj.cpp:
2854         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2855         * bindings/scripts/test/V8/V8TestObj.cpp:
2856         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
2857         * bindings/v8/IDBBindingUtilities.cpp:
2858         (WebCore::createIDBKeyFromValue):
2859         * bindings/v8/V8Binding.cpp:
2860         (WebCore::toInt32):
2861         (WebCore::toUInt32):
2862         * bindings/v8/custom/V8GeolocationCustom.cpp:
2863         (WebCore::createPositionOptions):
2864         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2865         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
2866         * bindings/v8/custom/V8WebKitPointCustom.cpp:
2867         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2868         * bridge/qt/qt_runtime.cpp:
2869         (JSC::Bindings::convertValueToQVariant):
2870         * css/WebKitCSSMatrix.cpp:
2871         (WebCore::WebKitCSSMatrix::translate):
2872         (WebCore::WebKitCSSMatrix::scale):
2873         (WebCore::WebKitCSSMatrix::rotate):
2874         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
2875         (WebCore::WebKitCSSMatrix::skewX):
2876         (WebCore::WebKitCSSMatrix::skewY):
2877         * html/HTMLMediaElement.cpp:
2878         (WebCore::HTMLMediaElement::percentLoaded):
2879         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2880         (WebCore::HTMLMediaElement::endedPlayback):
2881         * html/MediaController.cpp:
2882         (MediaController::duration):
2883         * html/canvas/WebGLRenderingContext.cpp:
2884         (WebCore):
2885         (WebCore::WebGLRenderingContext::clearColor):
2886         * html/track/TextTrack.cpp:
2887         (WebCore::TextTrack::addCue):
2888         * html/track/TextTrackCue.cpp:
2889         (WebCore::TextTrackCue::setStartTime):
2890         (WebCore::TextTrackCue::setEndTime):
2891         * page/DOMWindow.cpp:
2892         (WebCore::DOMWindow::adjustWindowRect):
2893         * page/WindowFeatures.cpp:
2894         (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
2895         * platform/CalculationValue.cpp:
2896         (WebCore::CalculationValue::evaluate):
2897         * platform/Decimal.cpp:
2898         (WebCore::Decimal::fromDouble):
2899         * platform/Length.cpp:
2900         (WebCore::Length::nonNanCalculatedValue):
2901         * platform/audio/AudioResampler.cpp:
2902         (WebCore::AudioResampler::setRate):
2903         * platform/audio/DynamicsCompressorKernel.cpp:
2904         (WebCore::DynamicsCompressorKernel::process):
2905         * platform/audio/Reverb.cpp:
2906         (WebCore::calculateNormalizationScale):
2907         * platform/graphics/Font.cpp:
2908         (WebCore::Font::width):
2909         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2910         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
2911         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2912         (LoopBlinnMathUtils):
2913         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2914         (WebCore::MediaPlayerPrivateGStreamer::buffered):
2915         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
2916         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2917         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
2918         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
2919         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
2920         * platform/graphics/transforms/TransformationMatrix.cpp:
2921         (WebCore::clampEdgeValue):
2922         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
2923         * platform/network/ResourceResponseBase.cpp:
2924         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2925         * rendering/RenderMediaControlsChromium.cpp:
2926         (WebCore::paintMediaSlider):
2927         (WebCore::paintMediaVolumeSlider):
2928         * rendering/RenderThemeMac.mm:
2929         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2930         * svg/SVGAnimationElement.cpp:
2931         (WebCore::SVGAnimationElement::beginElementAt):
2932         (WebCore::SVGAnimationElement::endElementAt):
2933         * svg/SVGSVGElement.cpp:
2934         (WebCore::SVGSVGElement::setCurrentTime):
2935         * svg/animation/SMILTime.h:
2936         (WebCore::SMILTime::SMILTime):
2937         * svg/animation/SVGSMILElement.cpp:
2938         (WebCore::SVGSMILElement::addBeginTime):
2939         (WebCore::SVGSMILElement::addEndTime):
2940         * xml/XPathFunctions.cpp:
2941         (WebCore::XPath::FunSubstring::evaluate):
2942         (WebCore::XPath::FunRound::round):
2943         * xml/XPathValue.cpp:
2944         (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
2945         (WebCore::XPath::Value::toString):
2946
2947 2013-02-13  Eric Carlson  <eric.carlson@apple.com>
2948
2949         [Mac] Caption menu should have only one item selected
2950         https://bugs.webkit.org/show_bug.cgi?id=109730
2951
2952         Reviewed by Dean Jackson.
2953
2954         No new tests, media/track/track-user-preferences.html was modified to test the changes.
2955
2956         * CMakeLists.txt: Add CaptionUserPreferences.cpp.
2957         * GNUmakefile.list.am: Ditto.
2958         * Target.pri: Ditto.
2959         * WebCore.gypi: Ditto.
2960         * WebCore.vcproj/WebCore.vcproj: Ditto.
2961         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2962         * WebCore.xcodeproj/project.pbxproj: Ditto.
2963
2964         * html/HTMLMediaElement.cpp:
2965         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
2966         (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
2967             called because of a preferences change.
2968         (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
2969             of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
2970         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks, 
2971             not just track elements.
2972         * html/HTMLMediaElement.h:
2973
2974         * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
2975         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
2976         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
2977         (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
2978         (WebCore::CaptionUserPreferences::captionPreferencesChanged):
2979         (WebCore::CaptionUserPreferences::preferredLanguages):
2980         (WebCore::CaptionUserPreferences::setPreferredLanguage):
2981         (WebCore::CaptionUserPreferences::displayNameForTrack):
2982         * page/CaptionUserPreferences.h:
2983
2984         * page/CaptionUserPreferencesMac.h:
2985         * page/CaptionUserPreferencesMac.mm:
2986         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
2987             to base class.
2988         (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
2989
2990 2013-02-13  Hans Muller  <hmuller@adobe.com>
2991
2992         [CSS Exclusions] ExclusionPolygon reflex vertices should constrain the first fit location.
2993         https://bugs.webkit.org/show_bug.cgi?id=107568
2994
2995         Reviewed by Dirk Schulze.
2996
2997         The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges
2998         for each of the polygon's reflex vertices. The motivation for this change is explained
2999         here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html.
3000
3001         Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html
3002
3003         * rendering/ExclusionPolygon.cpp:
3004         (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex.
3005         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices.
3006         * rendering/ExclusionPolygon.h:
3007         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex.
3008         (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge.
3009
3010 2013-02-13  Adam Barth  <abarth@webkit.org>
3011
3012         CSSPreloadScanner should not depend on HTMLToken
3013         https://bugs.webkit.org/show_bug.cgi?id=109742
3014
3015         Reviewed by Eric Seidel.
3016
3017         There's no need for the CSSPreloadScanner to depend on HTMLToken. On
3018         the background thread, we'll likely want to use a CompactHTMLToken for
3019         preload scanning, so this dependency is problematic. This patch also
3020         teaches the CSSPreloadScanner how to scan LChars.
3021
3022         * html/parser/CSSPreloadScanner.cpp:
3023         (WebCore::CSSPreloadScanner::~CSSPreloadScanner):
3024         (WebCore):
3025         (WebCore::CSSPreloadScanner::scan):
3026         * html/parser/CSSPreloadScanner.h:
3027         (CSSPreloadScanner):
3028         * html/parser/HTMLPreloadScanner.cpp:
3029         (WebCore::HTMLPreloadScanner::processToken):
3030
3031 2013-02-13  Julien Chaffraix  <jchaffraix@webkit.org>
3032
3033         [CSS Grid Layout] Adding or removing grid items doesn't properly recompute the track sizes
3034         https://bugs.webkit.org/show_bug.cgi?id=109100
3035
3036         Reviewed by Ojan Vafai.
3037
3038         Test: fast/css-grid-layout/grid-item-removal-track-breadth-update.html
3039
3040         The test uncovered several bugs in our implementation that is fixed as part
3041         of this change. They will be detailed below.
3042
3043         * rendering/RenderGrid.cpp:
3044         (WebCore::RenderGrid::logicalContentHeightForChild):
3045         Added this function to share the code between minContentForChild and maxContentForChild.
3046         Also forced a relayout in this case to avoid getting a wrong answer (e.g. the logical height
3047         constrained by the previous layout's grid breadth).
3048
3049         (WebCore::RenderGrid::minContentForChild):
3050         (WebCore::RenderGrid::maxContentForChild):
3051         Updated to use logicalContentHeightForChild.
3052
3053         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
3054         Updated to match the specification and set max breadth to current breadth per the specification.
3055         This made us over-grow some cases in the test.
3056
3057         (WebCore::RenderGrid::distributeSpaceToTracks):
3058         Updated to match the specification and use an extra variable to do the intermediate spreading. Also removed
3059         a now unneeded max. This fixes the case of multiple grid items in the same grid area that was completely broken.
3060
3061         (WebCore::RenderGrid::layoutGridItems):
3062         Added a FIXME about always relaying out content sized tracks' children.
3063
3064         * rendering/RenderGrid.h:
3065         Added logicalContentHeightForChild.
3066
3067 2013-02-13  Adam Barth  <abarth@webkit.org>
3068
3069         Clean up some style nits in HTMLPreloadScanner
3070         https://bugs.webkit.org/show_bug.cgi?id=109738
3071
3072         Reviewed by Tony Gentilcore.
3073
3074         This patch just fixes a few style nits I noticed when reading through
3075         the code.
3076
3077         * html/parser/HTMLPreloadScanner.cpp:
3078         (WebCore::StartTagScanner::StartTagScanner):
3079         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
3080         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
3081         * html/parser/HTMLResourcePreloader.cpp:
3082         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
3083         * html/parser/HTMLResourcePreloader.h:
3084         (PreloadRequest):
3085         (WebCore::PreloadRequest::PreloadRequest):
3086         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
3087
3088 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3089
3090         Unreviewed, rolling out r142747.
3091         http://trac.webkit.org/changeset/142747
3092         https://bugs.webkit.org/show_bug.cgi?id=109746
3093
3094         broke component build (Requested by alecf_gardening on
3095         #webkit).
3096
3097         * inspector/HeapGraphSerializer.cpp:
3098         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3099         (WebCore::HeapGraphSerializer::pushUpdate):
3100         (WebCore::HeapGraphSerializer::reportNode):
3101         (WebCore::HeapGraphSerializer::toNodeId):
3102         (WebCore::HeapGraphSerializer::addRootNode):
3103         * inspector/HeapGraphSerializer.h:
3104         (WebCore):
3105         (HeapGraphSerializer):
3106         * inspector/InspectorMemoryAgent.cpp:
3107         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
3108
3109 2013-02-13  Levi Weintraub  <leviw@chromium.org>
3110
3111         Bidi-Isolated inlines can cause subsequent content to not be rendered
3112         https://bugs.webkit.org/show_bug.cgi?id=108137
3113
3114         Reviewed by Eric Seidel.
3115
3116         First step in fixing how inline isolates behave with collapsed spaces.
3117         webkit.org/b/109624 tracks the overarching issue.
3118
3119         Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
3120
3121         * rendering/InlineIterator.h:
3122         (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
3123         ignoring spaces, ensure we leave it considering them again. This can result in
3124         including spaces that should be ignored following the isolate on the line, but
3125         failing to do so results in those contents not being rendered at all.
3126
3127 2013-02-13  Andreas Kling  <akling@apple.com>
3128
3129         Better names for ElementAttributeData & subclasses.
3130         <http://webkit.org/b/109529>
3131
3132         Reviewed by Antti Koivisto.
3133
3134         - ElementAttributeData => ElementData
3135
3136             Because ElementAttributeData won't be a good name once we move some non-attribute related
3137             things to this structure.
3138
3139         - ImmutableElementAttributeData => ShareableElementData
3140
3141             These objects can be shared with other Elements that have the same attribute name/value pairs.
3142
3143         - MutableElementAttributeData => UniqueElementData
3144
3145             These objects contain data that is unique to a specific Element, and cannot be shared with
3146             other Elements. This is what's important about it, not that its underlying storage is mutable.
3147
3148         - attributeData() -> elementData()
3149         - updatedAttributeData() -> elementDataWithSynchronizedAttributes()
3150         - ensureUpdatedAttributeData() -> ensureElementDataWithSynchronizedAttributes()
3151         - mutableAttributeData() -> ensureUniqueElementData()
3152
3153             Ride-along renames. Much less vague than previous names IMO.
3154
3155         * css/StyleResolver.cpp:
3156         (WebCore::StyleResolver::canShareStyleWithControl):
3157         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3158         * dom/Attr.cpp:
3159         (WebCore::Attr::elementAttribute):
3160         * dom/DocumentSharedObjectPool.cpp:
3161         (WebCore::ShareableElementDataCacheKey::ShareableElementDataCacheKey):
3162         (WebCore::ShareableElementDataCacheKey::operator!=):
3163         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
3164         (ShareableElementDataCacheEntry):
3165         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
3166         * dom/DocumentSharedObjectPool.h:
3167         (DocumentSharedObjectPool):
3168         * dom/Element.cpp:
3169         (WebCore::Element::detachAttribute):
3170         (WebCore::Element::removeAttribute):
3171         (WebCore::Element::attributes):
3172         (WebCore::Element::getAttribute):
3173         (WebCore::Element::setAttribute):
3174         (WebCore::Element::setSynchronizedLazyAttribute):
3175         (WebCore::Element::setAttributeInternal):
3176         (WebCore::Element::attributeChanged):
3177         (WebCore::Element::classAttributeChanged):
3178         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
3179         (WebCore::Element::parserSetAttributes):
3180         (WebCore::Element::hasAttributes):
3181         (WebCore::Element::hasEquivalentAttributes):
3182         (WebCore::Element::setAttributeNode):
3183         (WebCore::Element::removeAttributeNode):
3184         (WebCore::Element::removeAttributeInternal):
3185         (WebCore::Element::addAttributeInternal):
3186         (WebCore::Element::getAttributeNode):
3187         (WebCore::Element::getAttributeNodeNS):
3188         (WebCore::Element::hasAttribute):
3189         (WebCore::Element::hasAttributeNS):
3190         (WebCore::Element::computeInheritedLanguage):
3191         (WebCore::Element::getURLAttribute):
3192         (WebCore::Element::getNonEmptyURLAttribute):
3193         (WebCore::Element::cloneAttributesFromElement):
3194         (WebCore::Element::createUniqueElementData):
3195         (WebCore::Element::reportMemoryUsage):
3196         (WebCore::ElementData::deref):
3197         (WebCore::ElementData::ElementData):
3198         (WebCore::sizeForShareableElementDataWithAttributeCount):
3199         (WebCore::ElementData::createShareableWithAttributes):
3200         (WebCore::ElementData::createUnique):
3201         (WebCore::ShareableElementData::ShareableElementData):
3202         (WebCore::ShareableElementData::~ShareableElementData):
3203         (WebCore::UniqueElementData::UniqueElementData):
3204         (WebCore::ElementData::makeMutableCopy):
3205         (WebCore::ElementData::makeImmutableCopy):
3206         (WebCore::ElementData::setPresentationAttributeStyle):
3207         (WebCore::ElementData::addAttribute):
3208         (WebCore::ElementData::removeAttribute):
3209         (WebCore::ElementData::isEquivalent):
3210         (WebCore::ElementData::reportMemoryUsage):
3211         (WebCore::ElementData::getAttributeItemIndexSlowCase):
3212         * dom/Element.h:
3213         (ElementData):
3214         (WebCore::ElementData::isUnique):
3215         (ShareableElementData):
3216         (UniqueElementData):
3217         (WebCore::Element::getAttributeItemIndex):
3218         (WebCore::Element::elementData):
3219         (Element):
3220         (WebCore::Element::elementDataWithSynchronizedAttributes):
3221         (WebCore::Element::ensureElementDataWithSynchronizedAttributes):
3222         (WebCore::Element::fastHasAttribute):
3223         (WebCore::Element::fastGetAttribute):
3224         (WebCore::Element::hasAttributesWithoutUpdate):
3225         (WebCore::Element::idForStyleResolution):
3226         (WebCore::Element::classNames):
3227         (WebCore::Element::attributeCount):
3228         (WebCore::Element::attributeItem):
3229         (WebCore::Element::getAttributeItem):
3230         (WebCore::Element::updateInvalidAttributes):
3231         (WebCore::Element::hasID):
3232         (WebCore::Element::hasClass):
3233         (WebCore::Element::ensureUniqueElementData):
3234         (WebCore::ElementData::mutableAttributeVector):
3235         (WebCore::ElementData::immutableAttributeArray):
3236         (WebCore::ElementData::length):
3237         (WebCore::ElementData::presentationAttributeStyle):
3238         (WebCore::ElementData::getAttributeItem):
3239         (WebCore::ElementData::getAttributeItemIndex):
3240         (WebCore::ElementData::attributeItem):
3241         * dom/Node.cpp:
3242         (WebCore::Node::dumpStatistics):
3243         (WebCore::Node::compareDocumentPosition):
3244         * dom/StyledElement.cpp:
3245         (WebCore::StyledElement::updateStyleAttribute):
3246         (WebCore::StyledElement::ensureMutableInlineStyle):
3247         (WebCore::StyledElement::attributeChanged):
3248         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
3249         (WebCore::StyledElement::setInlineStyleFromString):
3250         (WebCore::StyledElement::styleAttributeChanged):
3251         (WebCore::StyledElement::inlineStyleChanged):
3252         (WebCore::StyledElement::addSubresourceAttributeURLs):
3253         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
3254         * dom/StyledElement.h:
3255         (WebCore::StyledElement::inlineStyle):
3256         (WebCore::StyledElement::invalidateStyleAttribute):
3257         (WebCore::StyledElement::presentationAttributeStyle):
3258         * html/ClassList.cpp:
3259         (WebCore::ClassList::classNames):
3260         * html/HTMLInputElement.cpp:
3261         (WebCore::HTMLInputElement::updateType):
3262         * html/parser/HTMLConstructionSite.cpp:
3263         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3264         * svg/SVGElement.cpp:
3265         (WebCore::SVGElement::updateAnimatedSVGAttribute):
3266         * svg/SVGElement.h:
3267         (WebCore::SVGElement::invalidateSVGAttributes):
3268         * xml/parser/XMLDocumentParserQt.cpp:
3269         (WebCore::XMLDocumentParser::XMLDocumentParser):
3270
3271 2013-02-13  Christian Biesinger  <cbiesinger@chromium.org>
3272
3273         Crash when encountering <object style="resize:both;">
3274         https://bugs.webkit.org/show_bug.cgi?id=109728
3275
3276         See also https://code.google.com/p/chromium/issues/detail?id=175535
3277         This bug can be reproduced on
3278         http://dramalink.net/tudou.y/?xink=162601060
3279
3280         Reviewed by Eric Seidel.
3281
3282         Test: fast/css/resize-object-crash.html
3283
3284         * rendering/RenderWidget.cpp:
3285         (WebCore::RenderWidget::paint):
3286         Only call paintResizer() if we have a layer and canResize() is true
3287
3288 2013-02-13  Arko Saha  <arko@motorola.com>
3289
3290         [Microdata] HTMLPropertiesCollection code cleanup
3291         https://bugs.webkit.org/show_bug.cgi?id=109721
3292
3293         Reviewed by Ryosuke Niwa.
3294
3295         Removed forward declaration of DOMStringList class.
3296         Removed unused findRefElements() method declaration.
3297         Also Removed unused parameter Element* from updatePropertyCache() method.
3298
3299         No new test since no change in behavior.
3300
3301         * html/HTMLPropertiesCollection.cpp:
3302         (WebCore::HTMLPropertiesCollection::updateNameCache):
3303         * html/HTMLPropertiesCollection.h:
3304         (WebCore):
3305         (HTMLPropertiesCollection):
3306         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
3307
3308 2013-02-13  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3309
3310         [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
3311         https://bugs.webkit.org/show_bug.cgi?id=109382
3312
3313         Reviewed by Kenneth Russell.
3314
3315         Covered by fast/canvas/webgl/oes-vertex-array-object.html
3316
3317         This patch adds support for using Vertex Array Object with OpenGl.
3318         The patch adds support for loading necessary opengl functions
3319         and support for checking GL_ARB_vertex_array_object. The support
3320         for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
3321         supported.
3322
3323         * platform/graphics/OpenGLShims.cpp:
3324         (WebCore::initializeOpenGLShims):
3325         * platform/graphics/OpenGLShims.h:
3326         (_OpenGLFunctionTable):
3327         Added support for loading the necessary functions.
3328
3329         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3330         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
3331         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
3332         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
3333         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
3334         (WebCore::Extensions3DOpenGL::supportsExtension):
3335
3336         (WebCore):
3337         (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
3338         * platform/graphics/opengl/Extensions3DOpenGL.h:
3339         (Extensions3DOpenGL):
3340
3341 2013-02-13  Eberhard Graether  <egraether@google.com>
3342
3343         chromium: remove CompositorHUDFontAtlas
3344         https://bugs.webkit.org/show_bug.cgi?id=109328
3345
3346         Reviewed by James Robinson.
3347
3348         After switching the HudLayer to use skia's font rendering the
3349         CompositorHUDFontAtlas has become obsolete. This change removes
3350         this class and the related WebLayerTreeView API.
3351
3352         No new tests.
3353
3354         * WebCore.gypi:
3355         * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
3356         * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
3357
3358 2013-02-13  Dean Jackson  <dino@apple.com>
3359
3360         Small update to speech bubble for captions menu [Mac]
3361         https://bugs.webkit.org/show_bug.cgi?id=109641
3362
3363         Reviewed by Eric Carlson
3364
3365         Small adjustment to the embedded SVG that draws a speech bubble
3366         for the captions button. Remove a polygon that was so small
3367         it looked like a rendering error.
3368
3369         * css/mediaControlsQuickTime.css:
3370         (video::-webkit-media-controls-toggle-closed-captions-button):
3371
3372 2013-02-13  Dean Jackson  <dino@apple.com>
3373
3374         Clicking outside captions menu should dismiss it
3375         https://bugs.webkit.org/show_bug.cgi?id=109648
3376
3377         Reviewed by Eric Carlson.
3378
3379         Add a virtual override to the platform-specific
3380         defaultEventHandler to intercept any click in the controls,
3381         and hide the captions menu if it is showing.
3382
3383         Test: media/video-controls-captions-trackmenu-hide-on-click.html
3384
3385         * html/shadow/MediaControlsApple.cpp:
3386         (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
3387             captions menu if a click event comes in.
3388         * html/shadow/MediaControlsApple.h:
3389
3390 2013-02-13  Tommy Widenflycht  <tommyw@google.com>
3391
3392         MediaStream API: Use the source id when creating new tracks
3393         https://bugs.webkit.org/show_bug.cgi?id=109688
3394
3395         Reviewed by Adam Barth.
3396
3397         This patch reuses the ids from the source when creating tracks instead of creating a new one.
3398         This was requested by the chromium port to greatly simplify their implementation.
3399         In the longer run the API should be rewritten to only use tracks instead of sources.
3400
3401         Covered by existing tests.
3402
3403         * platform/chromium/support/WebMediaStream.cpp:
3404         (WebKit::WebMediaStream::audioTracks):
3405         (WebKit::WebMediaStream::videoTracks):
3406         (WebKit::WebMediaStream::initialize):
3407         (WebKit):
3408         * platform/chromium/support/WebMediaStreamTrack.cpp:
3409         (WebKit::WebMediaStreamTrack::initialize):
3410         (WebKit):
3411         * platform/mediastream/MediaStreamComponent.h:
3412         (WebCore::MediaStreamComponent::create):
3413         (MediaStreamComponent):
3414         (WebCore::MediaStreamComponent::MediaStreamComponent):
3415         (WebCore):
3416         * platform/mediastream/MediaStreamDescriptor.h:
3417         (WebCore::MediaStreamDescriptor::create):
3418         (MediaStreamDescriptor):
3419         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
3420
3421 2013-02-13  Eric Seidel  <eric@webkit.org>
3422
3423         Use fancy new Vector-based String constructors in the WebVTT parser
3424         https://bugs.webkit.org/show_bug.cgi?id=109619
3425
3426         Reviewed by Benjamin Poulain.
3427
3428         No change in behavior. Added some FIXMEs for future perf optimization.
3429
3430         * html/track/WebVTTParser.cpp:
3431         (WebCore::WebVTTParser::constructTreeFromToken):
3432
3433 2013-02-13  Morten Stenshorne  <mstensho@opera.com>
3434
3435         WebKit ignores column-rules wider than column-gap
3436         https://bugs.webkit.org/show_bug.cgi?id=15553
3437
3438         Paint column rules even if they are wider than the gap.
3439         Rules wider than the gap should just overlap with column contents.
3440
3441         Reviewed by Eric Seidel.
3442
3443         Test: fast/multicol/rule-thicker-than-gap.html
3444
3445         * rendering/RenderBlock.cpp:
3446         (WebCore::RenderBlock::paintColumnRules):
3447
3448 2013-02-13  Philip Rogers  <pdr@google.com>
3449
3450         Replace SVG bitmap cache with directly-rendered SVG
3451         https://bugs.webkit.org/show_bug.cgi?id=106159
3452
3453         Reviewed by Tim Horton.
3454
3455         This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
3456         enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
3457         http://ie.microsoft.com/testdrive/Performance/Chalkboard/
3458
3459         On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
3460         (http://philbit.com/SvgImagePerformance/viewport.html):
3461             without patch: ~20FPS
3462             with patch: ~55FPS
3463
3464         The bitmap SVG image cache had several shortcomings:
3465             - The bitmap cache prevented viewport rendering. (WK104693)
3466             - Bitmap memory usage was high. (WK106484)
3467             - Caching animating images was expensive.
3468
3469         This change removes almost all of the SVGImageCache implementation, replacing it with
3470         directly-rendered SVG. Instead of caching bitmaps, an SVGImageForContainer is cached which
3471         is a thin wrapper around an SVG image with the associated container size and scale.
3472         When rendering patterns (e.g., tiled backgrounds), a temporary bitmap is used for
3473         performance. This change also removes the redraw timer of the old cache, instead relying
3474         on the SVG image to notify clients if the image changes (e.g., during animations).
3475
3476         This patch fixes two existing bugs (WK99481 and WK104189) that were due to caching bitmaps
3477         at a fixed size. A test has been added for each of these bugs.
3478
3479         Tests: svg/as-image/svg-image-scaled.html
3480                svg/as-image/svg-image-viewbox.html
3481
3482         * CMakeLists.txt:
3483         * GNUmakefile.list.am:
3484         * Target.pri:
3485         * WebCore.gypi:
3486         * WebCore.vcproj/WebCore.vcproj:
3487         * WebCore.xcodeproj/project.pbxproj:
3488         * loader/cache/CachedImage.cpp:
3489         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
3490         (WebCore::CachedImage::setContainerSizeForRenderer):
3491         (WebCore::CachedImage::clear):
3492         (WebCore::CachedImage::changedInRect):
3493
3494             SVG images are no longer special-cased here. When the SVG image changes, users are
3495             notified through this function, and users can then request their content to be redrawn.
3496
3497         * svg/graphics/SVGImage.cpp:
3498         (WebCore::SVGImage::setContainerSize):
3499         (WebCore::SVGImage::drawForContainer):
3500
3501             drawForContainer lays out the SVG content for a specific container size and renders it.
3502             The logic is fairly straightforward but a note about the scales and zooms here:
3503                 the destination rect parameter is zoomed but not scaled
3504                 the source rect parameter is zoomed but not scaled
3505                 the context is scaled but not zoomed
3506             SVGImage::draw(...) only accepts a source and destination rect but does not consider
3507             scale or zoom. Therefore, drawForContainer removes the zoom component from the source
3508             so SVGImage::draw(...) will draw from the pre-zoom source to the post-zoom destination.
3509
3510         (WebCore::SVGImage::drawPatternForContainer):
3511
3512             For performance, drawPatternForContainer renders the SVG content onto a bitmap, then
3513             has the bitmap image draw the pattern. This is necessary because drawPattern is used
3514             for tiling.
3515
3516         (WebCore):
3517         (WebCore::SVGImage::startAnimation):
3518         (WebCore::SVGImage::stopAnimation):
3519         (WebCore::SVGImage::resetAnimation):
3520         (WebCore::SVGImage::reportMemoryUsage):
3521         * svg/graphics/SVGImage.h:
3522         (WebCore):
3523         (SVGImage):
3524         * svg/graphics/SVGImageCache.cpp:
3525
3526             Instead of storing a SizeAndScales values for each renderer, a SVGImageForContainer
3527             is stored which is just a thin wrapper around an SVG image that contains container
3528             sizing information. By combining the image and size information, the two maps of
3529             SVGImageCache have been merged into one.
3530
3531             To make this patch easier to review, SVGImageCache still exists and works similar to
3532             how it did before the patch. Now, SVGImageCache simply stores the SVGImageForContainers.
3533             In a followup patch it will be removed.
3534
3535             Note: the redraw timer of SVGImageCache has been removed because animation
3536             invalidation is now properly propagated back to the image clients.
3537
3538         (WebCore):
3539         (WebCore::SVGImageCache::SVGImageCache):
3540         (WebCore::SVGImageCache::~SVGImageCache):
3541         (WebCore::SVGImageCache::removeClientFromCache):
3542         (WebCore::SVGImageCache::setContainerSizeForRenderer):
3543         (WebCore::SVGImageCache::imageSizeForRenderer):
3544
3545             Previously, this function returned the scaled image size which was incorrect. The image
3546             size is used by clients such as GraphicsContext2D to determine the source size
3547             for drawing the image. draw() accepts zoomed but not scaled values, so this has been
3548             changed.
3549
3550         (WebCore::SVGImageCache::imageForRenderer):
3551
3552             A FIXME has been added here to not set the scale on every lookup. This can be improved
3553             by setting the page scale factor in setContainerSizeForRenderer() in a future patch.
3554
3555         * svg/graphics/SVGImageCache.h:
3556         (WebCore):
3557         (SVGImageCache):
3558         * svg/graphics/SVGImageForContainer.cpp: Added.
3559         (WebCore):
3560
3561             SVGImageForContainer is a thin wrapper around an SVG image. The lifetime of the
3562             SVGImage will be longer than the image cache.
3563
3564         (WebCore::SVGImageForContainer::size):
3565
3566             This is the only logic in SVGImageForContainer. The size returned needs to be zoomed
3567             but not scaled because it is used (e.g., by RenderImage) to pass back into draw() which
3568             takes zoomed but not scaled values.
3569
3570         (WebCore::SVGImageForContainer::draw):
3571         (WebCore::SVGImageForContainer::drawPattern):
3572         * svg/graphics/SVGImageForContainer.h: Added.
3573         (WebCore):
3574         (SVGImageForContainer):
3575
3576             In a future patch SVGImageForContainer can be made immutable but without a refactoring
3577             for not setting the page scale factor in SVGImageCache::lookupOrCreateImageForRenderer,
3578             setters are needed.
3579
3580         (WebCore::SVGImageForContainer::create):
3581         (WebCore::SVGImageForContainer::containerSize):
3582         (WebCore::SVGImageForContainer::pageScale):
3583         (WebCore::SVGImageForContainer::zoom):
3584         (WebCore::SVGImageForContainer::setSize):
3585         (WebCore::SVGImageForContainer::setZoom):
3586         (WebCore::SVGImageForContainer::setPageScale):
3587         (WebCore::SVGImageForContainer::SVGImageForContainer):
3588         (WebCore::SVGImageForContainer::destroyDecodedData):
3589         (WebCore::SVGImageForContainer::decodedSize):
3590
3591 2013-02-12  Antti Koivisto  <antti@apple.com>
3592
3593         Avoid updating timer heap when nothing changes
3594         https://bugs.webkit.org/show_bug.cgi?id=109630
3595
3596         Reviewed by Andreas Kling.
3597
3598         When the fire time of a Timer is changed we remove it from the timer heap and reinsert it. This is pretty slow. 
3599         Turns out that in ~80% of cases we are already in the heap and the insertion position is the same as the 
3600         original position. We can check if anything is actually going to change before doing this work.
3601         
3602         This makes starting a timer ~30% faster in average, ~0.1% progression in PLT3.
3603         
3604         * platform/Timer.cpp:
3605         (TimerHeapLessThanFunction):
3606         (WebCore::TimerHeapLessThanFunction::operator()):
3607         (WebCore::parentHeapPropertyHolds):
3608         (WebCore):
3609         (WebCore::childHeapPropertyHolds):
3610         (WebCore::TimerBase::hasValidHeapPosition):
3611         
3612             The code here assumes that STL heap is a normal binary heap. If there is a different implementation
3613             somewhere the assertions will catch it.
3614
3615         (WebCore::TimerBase::updateHeapIfNeeded):
3616         
3617             Skip updating the heap if it is already valid.
3618
3619         (WebCore::TimerBase::setNextFireTime):
3620         * platform/Timer.h:
3621         (TimerBase):
3622
3623 2013-02-13  Martin Robinson  <mrobinson@igalia.com>
3624
3625         [GTK] Remove remaining dead code from the GLib unicode backend
3626         https://bugs.webkit.org/show_bug.cgi?id=109707
3627
3628         Reviewed by Philippe Normand.
3629
3630         * platform/KURL.cpp:
3631         (WebCore::appendEncodedHostname):
3632         * platform/text/TextEncoding.cpp:
3633         (WebCore::TextEncoding::encode):
3634         * platform/text/TextEncodingRegistry.cpp:
3635         (WebCore::buildBaseTextCodecMaps):
3636         (WebCore::extendTextCodecMaps):
3637
3638 2013-02-13  Xianzhu Wang  <wangxianzhu@chromium.org>
3639
3640         Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
3641         https://bugs.webkit.org/show_bug.cgi?id=108695
3642
3643         See comments of RenderLayerModelObject::willBeDestroyed() below for details.
3644
3645         Reviewed by Abhishek Arya.
3646
3647         Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
3648         Unable to write a normal layout test because
3649         1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
3650         2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.
3651
3652         * rendering/RenderBoxModelObject.cpp:
3653         (WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
3654         * rendering/RenderLayerModelObject.cpp:
3655         (WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.
3656
3657 2013-02-13  Florin Malita  <fmalita@chromium.org>
3658
3659         [SVG] OOB access in SVGListProperty::replaceItemValues()
3660         https://bugs.webkit.org/show_bug.cgi?id=109293
3661
3662         Replacing a list property item with itself should be a no-op. This patch updates the related
3663         APIs and logic to detect the self-replace case and prevent removal of the item from the list.
3664
3665         To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
3666         indices and a findItem() method is added to resolve an item to an index.
3667
3668         Reviewed by Dirk Schulze.
3669
3670         No new tests: updated existing tests cover the change.
3671
3672         * svg/properties/SVGAnimatedListPropertyTearOff.h:
3673         (WebCore::SVGAnimatedListPropertyTearOff::findItem):
3674         (SVGAnimatedListPropertyTearOff):
3675         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
3676         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
3677         (WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
3678         (SVGAnimatedPathSegListPropertyTearOff):
3679         (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
3680         Add a findItem() delegating method, and update removeItemFromList() to use the new
3681         index-based API.
3682
3683         * svg/properties/SVGListProperty.h:
3684         (WebCore::SVGListProperty::insertItemBeforeValues):
3685         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
3686         (WebCore::SVGListProperty::replaceItemValues):
3687         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
3688         (SVGListProperty):
3689         Updated to handle the no-op case for insertItemBefore() & replaceItem().
3690
3691         * svg/properties/SVGListPropertyTearOff.h:
3692         (WebCore::SVGListPropertyTearOff::findItem):
3693         (WebCore::SVGListPropertyTearOff::removeItemFromList):
3694         Index-based API updates.
3695
3696         (WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
3697         (WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
3698         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
3699         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
3700         Detect the self-replace case and return without removing the item from the list.
3701
3702         * svg/properties/SVGPathSegListPropertyTearOff.h:
3703         (WebCore::SVGPathSegListPropertyTearOff::findItem):
3704         (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
3705         (SVGPathSegListPropertyTearOff):
3706         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
3707         * svg/properties/SVGStaticListPropertyTearOff.h:
3708         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
3709         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
3710         Index-based API updates.
3711
3712 2013-02-13  Takashi Sakamoto  <tasak@google.com>
3713
3714         [Refactoring] StyleResolver::State should have methods to access its member variables.
3715         https://bugs.webkit.org/show_bug.cgi?id=108563
3716
3717         Reviewed by Antti Koivisto.
3718
3719         Made all member variables private and added methods to access the
3720         variables, because most of the member variables are read-only.
3721         We don't need to update those read-only variables while resolving
3722         styles.
3723
3724         No new tests, because just refactoring.
3725
3726         * css/SVGCSSStyleSelector.cpp:
3727         (WebCore::StyleResolver::applySVGProperty):
3728         * css/StyleResolver.cpp:
3729         (WebCore):
3730         (WebCore::StyleResolver::collectMatchingRules):
3731         (WebCore::StyleResolver::collectMatchingRulesForRegion):
3732         (WebCore::StyleResolver::sortAndTransferMatchedRules):
3733         (WebCore::StyleResolver::matchScopedAuthorRules):
3734         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
3735         (WebCore::StyleResolver::matchHostRules):
3736         (WebCore::StyleResolver::matchAuthorRules):
3737         (WebCore::StyleResolver::matchUserRules):
3738         (WebCore::StyleResolver::matchUARules):
3739         (WebCore::StyleResolver::collectMatchingRulesForList):
3740         (WebCore::StyleResolver::sortMatchedRules):
3741         (WebCore::StyleResolver::matchAllRules):
3742         (WebCore::StyleResolver::State::initElement):
3743         (WebCore::StyleResolver::initElement):
3744         Modified to invoke m_state.initElement if a given element is
3745         different from current m_state's element.
3746         (WebCore::StyleResolver::State::initForStyleResolve):
3747         Moved from StyleResolver.
3748         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3749         (WebCore::StyleResolver::canShareStyleWithControl):
3750         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3751         (WebCore::StyleResolver::canShareStyleWithElement):
3752         (WebCore::StyleResolver::locateSharedStyle):
3753         (WebCore::StyleResolver::styleForElement):
3754         (WebCore::StyleResolver::styleForKeyframe):
3755         (WebCore::StyleResolver::keyframeStylesForAnimation):
3756         (WebCore::StyleResolver::pseudoStyleForElement):
3757         Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
3758         wrong, because it depends on previous resolving. However,
3759         initForStyleResolve will also update m_state.parentStyle. No code in
3760         pseudoStyleForElement depends on previous resolving state.
3761         (WebCore::StyleResolver::styleForPage):
3762         (WebCore::StyleResolver::defaultStyleForElement):
3763         (WebCore::StyleResolver::adjustRenderStyle):
3764         (WebCore::StyleResolver::updateFont):
3765         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3766         (WebCore::StyleResolver::ruleMatches):
3767         Added one more parameter, dynamicPseudo, because dynamicPseudo in
3768         State class is just used for returning matched pseudo style from
3769         this ruleMatches to collectMatchingRulesForList. No need to keep
3770         dynamicPseudo while resolving styles.
3771         (WebCore::StyleResolver::checkRegionSelector):
3772         Removed m_pseudoStyle = NOPSEUDO, because this method uses just
3773         SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
3774         m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
3775         need to set m_pseudoStyle to be NOPSEUDO.
3776         (WebCore::StyleResolver::applyProperties):
3777         (WebCore::StyleResolver::applyMatchedProperties):
3778         (WebCore::StyleResolver::isLeftPage):
3779         (WebCore::StyleResolver::applyPropertyToStyle):
3780         (WebCore::StyleResolver::useSVGZoomRules):
3781         (WebCore::createGridTrackBreadth):
3782         (WebCore::StyleResolver::resolveVariables):
3783         (WebCore::StyleResolver::applyProperty):
3784         (WebCore::StyleResolver::cachedOrPendingFromValue):
3785         (WebCore::StyleResolver::generatedOrPendingFromValue):
3786         (WebCore::StyleResolver::setOrPendingFromValue):
3787         (WebCore::StyleResolver::cursorOrPendingFromValue):
3788         (WebCore::StyleResolver::checkForTextSizeAdjust):
3789         (WebCore::StyleResolver::initializeFontStyle):
3790         (WebCore::StyleResolver::setFontSize):
3791         (WebCore::StyleResolver::colorFromPrimitiveValue):
3792         (WebCore::StyleResolver::loadPendingSVGDocuments):
3793         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
3794         (WebCore::StyleResolver::loadPendingShaders):
3795         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
3796         (WebCore::StyleResolver::createFilterOperations):
3797         (WebCore::StyleResolver::loadPendingImage):
3798         (WebCore::StyleResolver::loadPendingImages):
3799         * css/StyleResolver.h:
3800         (WebCore::StyleResolver::style):
3801         (WebCore::StyleResolver::parentStyle):
3802         (WebCore::StyleResolver::rootElementStyle):
3803         (WebCore::StyleResolver::element):
3804         (WebCore::StyleResolver::hasParentNode):
3805         (StyleResolver):
3806         (WebCore::StyleResolver::State::State):
3807         (State):
3808         (WebCore::StyleResolver::State::clear):
3809         Modified to use clear at the end of styleForElement.
3810         (WebCore::StyleResolver::State::document):
3811         (WebCore::StyleResolver::State::element):
3812         (WebCore::StyleResolver::State::styledElement):
3813         (WebCore::StyleResolver::State::setStyle):
3814         (WebCore::StyleResolver::State::style):
3815         (WebCore::StyleResolver::State::takeStyle):
3816         (WebCore::StyleResolver::State::ensureRuleList):
3817         (WebCore::StyleResolver::State::takeRuleList):
3818         (WebCore::StyleResolver::State::parentNode):
3819         (WebCore::StyleResolver::State::setParentStyle):
3820         (WebCore::StyleResolver::State::parentStyle):
3821         (WebCore::StyleResolver::State::rootElementStyle):
3822         (WebCore::StyleResolver::State::regionForStyling):
3823         (WebCore::StyleResolver::State::setSameOriginOnly):
3824         (WebCore::StyleResolver::State::isSameOriginOnly):
3825         (WebCore::StyleResolver::State::pseudoStyle):
3826         (WebCore::StyleResolver::State::elementLinkState):
3827         (WebCore::StyleResolver::State::distributedToInsertionPoint):
3828         (WebCore::StyleResolver::State::setElementAffectedByClassRules):
3829         (WebCore::StyleResolver::State::elementAffectedByClassRules):
3830         (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
3831         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
3832         (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
3833         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
3834         (WebCore::StyleResolver::State::pendingImageProperties):
3835         (WebCore::StyleResolver::State::pendingSVGDocuments):
3836         (WebCore::StyleResolver::State::setHasPendingShaders):
3837         (WebCore::StyleResolver::State::hasPendingShaders):
3838         (WebCore::StyleResolver::State::setLineHeightValue):
3839         (WebCore::StyleResolver::State::lineHeightValue):
3840         (WebCore::StyleResolver::State::setFontDirty):
3841         (WebCore::StyleResolver::State::fontDirty):
3842         (WebCore::StyleResolver::State::cacheBorderAndBackground):
3843         (WebCore::StyleResolver::State::hasUAAppearance):
3844         (WebCore::StyleResolver::State::borderData):
3845         (WebCore::StyleResolver::State::backgroundData):
3846         (WebCore::StyleResolver::State::backgroundColor):
3847         (WebCore::StyleResolver::State::fontDescription):
3848         (WebCore::StyleResolver::State::parentFontDescription):
3849         (WebCore::StyleResolver::State::setFontDescription):
3850         (WebCore::StyleResolver::State::setZoom):
3851         (WebCore::StyleResolver::State::setEffectiveZoom):
3852         (WebCore::StyleResolver::State::setTextSizeAdjust):
3853         (WebCore::StyleResolver::State::setWritingMode):
3854         (WebCore::StyleResolver::State::setTextOrientation):
3855         fontDescription, ... and setTextOrientation were moved from
3856         StyleResolver.
3857         (WebCore::StyleResolver::State::matchedRules):
3858         (WebCore::StyleResolver::State::addMatchedRule):
3859         Moved from StyleResolver.
3860         (WebCore::StyleResolver::applyPropertyToRegularStyle):
3861         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
3862         (WebCore::StyleResolver::fontDescription):
3863         (WebCore::StyleResolver::parentFontDescription):
3864         (WebCore::StyleResolver::setFontDescription):
3865         (WebCore::StyleResolver::setZoom):
3866         (WebCore::StyleResolver::setEffectiveZoom):
3867         (WebCore::StyleResolver::setTextSizeAdjust):
3868         (WebCore::StyleResolver::setWritingMode):
3869         (WebCore::StyleResolver::setTextOrientation):
3870         These fontDescription, ..., setTextOrientation are wrappers to
3871         invoke State's methods. StyleBuilder still depends on StyleResolver
3872         and invokes these methods. So we need these wrappers.
3873
3874 2013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3875
3876         [Qt] window.open passes height and width parameters even if not defined in a page
3877         https://bugs.webkit.org/show_bug.cgi?id=107705
3878
3879         Reviewed by Kenneth Rohde Christiansen.
3880
3881         Do not override width or height of 0, as that indicates default size, and not minimum size.
3882
3883         Tested by tst_qwebpage.
3884
3885         * page/DOMWindow.cpp:
3886         (WebCore::DOMWindow::adjustWindowRect):
3887
3888 2013-02-13  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
3889
3890         The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
3891         https://bugs.webkit.org/show_bug.cgi?id=102656
3892
3893         Reviewed by Dirk Schulze.
3894
3895         The functions fillText()/strokeText() should not display anything when 
3896         maxWidth is less than or equal to zero, according to spec :
3897         http://www.w3.org/TR/2dcontext/#text-preparation-algorithm
3898
3899         Test: fast/canvas/canvas-fillText-maxWidth-zero.html
3900
3901         * html/canvas/CanvasRenderingContext2D.cpp:
3902         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3903
3904 2013-02-13  ChangSeok Oh  <shivamidow@gmail.com>
3905
3906         [GTK][AC] Implement basic transform animations with clutter ac backend
3907         https://bugs.webkit.org/show_bug.cgi?id=109363
3908
3909         Reviewed by Gustavo Noronha Silva.
3910
3911         Implement basic transform animation with clutter ac backend.
3912         GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
3913         interfaces are also similar with PlatformCAAnimation, but they are implemented
3914         with native clutter APIs. Clutter backend AC supports a basic single transform animation
3915         with this patch now, but additive animation combination and keyframe animation
3916         are not supported yet.
3917
3918         Covered by existing animation tests.
3919
3920         * platform/graphics/clutter/GraphicsLayerActor.cpp:
3921         (graphicsLayerActorSetTransform):
3922         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
3923         (WebCore::isTransformTypeTransformationMatrix):
3924         (WebCore):
3925         (WebCore::isTransformTypeFloatPoint3D):
3926         (WebCore::isTransformTypeNumber):
3927         (WebCore::getTransformFunctionValue):
3928         (WebCore::getValueFunctionNameForTransformOperation):
3929         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
3930         (WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
3931         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
3932         * platform/graphics/clutter/GraphicsLayerClutter.h:
3933         (GraphicsLayerClutter):
3934         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
3935         (WebCore::toClutterActorPropertyString):
3936         (WebCore):
3937         (WebCore::PlatformClutterAnimation::supportsValueFunction):
3938         (WebCore::PlatformClutterAnimation::duration):
3939         (WebCore::PlatformClutterAnimation::setDuration):
3940         (WebCore::PlatformClutterAnimation::setAdditive):
3941         (WebCore::PlatformClutterAnimation::valueFunction):
3942         (WebCore::PlatformClutterAnimation::setValueFunction):
3943         (WebCore::PlatformClutterAnimation::setFromValue):
3944         (WebCore::PlatformClutterAnimation::setToValue):
3945         (WebCore::PlatformClutterAnimation::timeline):
3946         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
3947         (WebCore::PlatformClutterAnimation::addOpacityTransition):
3948         (WebCore::PlatformClutterAnimation::addTransformTransition):
3949         (WebCore::PlatformClutterAnimation::addAnimationForKey):
3950         * platform/graphics/clutter/PlatformClutterAnimation.h:
3951         (PlatformClutterAnimation):
3952
3953 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
3954
3955         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
3956         https://bugs.webkit.org/show_bug.cgi?id=109554
3957
3958         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
3959         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
3960
3961         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
3962         It helps me to do the tests for the serializer.
3963
3964         Reviewed by Yury Semikhatsky.
3965
3966         It is covered by newly added tests in TestWebKitAPI.
3967
3968         * inspector/HeapGraphSerializer.cpp:
3969         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3970         (WebCore::HeapGraphSerializer::pushUpdate):
3971         (WebCore::HeapGraphSerializer::reportNode):
3972         (WebCore::HeapGraphSerializer::toNodeId):
3973         (WebCore::HeapGraphSerializer::addRootNode):
3974         * inspector/HeapGraphSerializer.h:
3975         (HeapGraphSerializer):
3976         (Client):
3977         (WebCore::HeapGraphSerializer::Client::~Client):
3978         * inspector/InspectorMemoryAgent.cpp:
3979         (WebCore):
3980         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
3981
3982 2013-02-13  Yury Semikhatsky  <yurys@chromium.org>
3983
3984         Web Inspector: add experimental native heap graph to Timeline panel
3985         https://bugs.webkit.org/show_bug.cgi?id=109687
3986
3987         Reviewed by Alexander Pavlov.
3988
3989         Added experimentatl support for native heap graph on the Timeline panel.
3990         Native memory usage data is collected after each top level task and can
3991         be displayed instead of DOM counters graph on the Timeline panel if
3992         corresponding experiment is enabled in the inspector settings.
3993