Remove support for "desktop-width" in the viewport meta tag
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2
3         Remove support for "desktop-width" in the viewport meta tag
4         https://bugs.webkit.org/show_bug.cgi?id=101217
5
6         Reviewed by Gyuyoung Kim.
7
8         This has been removed from the CSS Device Adaptation spec, and
9         should be safe to remove as it is not documented anywhere (neither
10         in blog posts).
11
12         The viewport meta should only support the legacy features.
13
14         * dom/ViewportArguments.cpp:
15         (WebCore::computeViewportAttributes):
16         (WebCore::findSizeValue):
17         (WebCore::findScaleValue):
18         (WebCore::findUserScalableValue):
19         * dom/ViewportArguments.h:
20
21 2012-11-07  Dominik Röttsches  <dominik.rottsches@intel.com>
22
23         [EFL] Fix execution of exif-orientation-image-document.html on EFL Wk2 bot
24         https://bugs.webkit.org/show_bug.cgi?id=101343
25
26         Reviewed by Kenneth Rohde Christiansen.
27
28         Add Cairo to the list of backends that support shouldRespectImageOrientation.
29
30         No new tests, fixes exif-orientation-image-document.html.
31
32         * rendering/RenderObject.cpp:
33         (WebCore::RenderObject::shouldRespectImageOrientation):
34
35 2012-11-06  Yury Semikhatsky  <yurys@chromium.org>
36
37         Console not displaying all properties of an Object once native Constructor overwritten
38         https://bugs.webkit.org/show_bug.cgi?id=101320
39
40         Reviewed by Pavel Feldman.
41
42         Use Object instance from {}.constructor when formatting inspector messages in the
43         injected script. Otherwise inspected page may overwrite Object value and break inspector.
44
45         Test: inspector/console/console-Object-overwritten.html
46
47         * inspector/InjectedScriptSource.js:
48
49 2012-11-06  Keishi Hattori  <keishi@webkit.org>
50
51         Implement month picking to calendar picker
52         https://bugs.webkit.org/show_bug.cgi?id=101333
53
54         Reviewed by Kent Tamura.
55
56         This adds month picker mode to CalendarPicker.
57
58         No new tests. Tests will be added later when this feature is enabled in DRT.
59
60         * Resources/pagepopups/calendarPicker.css:
61         (.month-mode .day): Remove rounded corners when in month mode.
62         * Resources/pagepopups/calendarPicker.js:
63         (Month.createFromToday): Creates month containing today.
64         (CalendarPicker): Set this.selectionConstructor to Day or Month depending on the mode. Create DayTables or MonthPickerDaysTable depending on the mode.
65         (CalendarPicker.prototype.handleToday):
66         (CalendarPicker.prototype._layoutButtons):
67         (DaysTable.prototype._renderMonth): Set element.dataset.monthValue for all date nodes.
68         (DaysTable.prototype._markRangeAsSelected): Marks all day nodes in range as selected.
69         (DaysTable.prototype.selectRange): Selects a day.
70         (DaysTable.prototype.selectRangeAndShowEntireRange): Same as selectRange.
71         (DaysTable.prototype._selectRangeContainingNode):
72         (DaysTable.prototype._rangeForNode): Returns Day for node.
73         (DaysTable.prototype.startDate): Start datetime of visible date range. This value is inclusive.
74         (DaysTable.prototype.endDate): End datetime of visible date range. This value is exclusive.
75         (DaysTable.prototype._handleKey):
76         (MonthPickerDaysTable):
77         (MonthPickerDaysTable.prototype._markRangeAsSelected): Marks all day nodes in range as selected.
78         (MonthPickerDaysTable.prototype.selectRange): Selects month. If month is not visible, navigates to that month.
79         (MonthPickerDaysTable.prototype.selectRangeAndShowEntireRange): Selects month. Navigates to the month.
80         (MonthPickerDaysTable.prototype._rangeForNode): Returns Month for node.
81         (MonthPickerDaysTable.prototype._handleKey): Arrow keys simply move the selection forwards or backwards.
82
83 2012-11-06  Dan Beam  <dbeam@chromium.org>
84
85         Enable REQUEST_AUTOCOMPLETE for chromium port
86         https://bugs.webkit.org/show_bug.cgi?id=101376
87
88         Reviewed by Adam Barth.
89
90         Added a runtime enabled feature to control whether HTMLFormElement#requestAutocomplete is visible from JavaScript.
91
92         * bindings/generic/RuntimeEnabledFeatures.cpp:
93         (WebCore):
94         * bindings/generic/RuntimeEnabledFeatures.h:
95         (RuntimeEnabledFeatures):
96
97         Added a binding from RuntimeEnabledFeatures that triggers [V8EnabledAtRuntime=requestAutocomplete].
98
99         (WebCore::RuntimeEnabledFeatures::requestAutocompleteEnabled):
100
101         Added a getter to WebCore to ask whether the runtime flag requestAutocomplete is on.
102
103         (WebCore::RuntimeEnabledFeatures::setRequestAutocompleteEnabled):
104
105         Added a setter to WebCore to affect the runtime flag requestAutocomplete.
106
107         * html/HTMLFormElement.idl:
108
109         Wrapped commonly grouped features in an #if defined(ENABLED_REQUEST_AUTOCOMPLETE) block and added [V8EnableAtRuntime]
110         so these features can be changed with a command line switch in the chromium port.
111
112 2012-11-06  Adam Barth  <abarth@webkit.org>
113
114         [V8] Unify setJSWrapperForDOMObject and setJSWrapperForDOMNode
115         https://bugs.webkit.org/show_bug.cgi?id=101422
116
117         Reviewed by Kentaro Hara.
118
119         This patch is another incremental step towards the patch in Bug 10110.
120         In this step, we unify setJSWrapperForDOMObject and
121         setJSWrapperForDOMNode.
122
123         * bindings/scripts/CodeGeneratorV8.pm:
124         (GenerateHeader):
125         (GenerateNormalAttrGetter):
126         (GenerateConstructorCallback):
127         (GenerateNamedConstructorCallback):
128         (GenerateToV8Converters):
129         * bindings/scripts/test/V8/V8Float64Array.h:
130         (WebCore::V8Float64Array::wrap):
131         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
132         (WebCore::V8TestActiveDOMObject::wrap):
133         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
134         (WebCore::V8TestCustomNamedGetter::wrap):
135         * bindings/scripts/test/V8/V8TestEventConstructor.h:
136         (WebCore::V8TestEventConstructor::wrap):
137         * bindings/scripts/test/V8/V8TestEventTarget.h:
138         (WebCore::V8TestEventTarget::wrap):
139         * bindings/scripts/test/V8/V8TestException.h:
140         (WebCore::V8TestException::wrap):
141         * bindings/scripts/test/V8/V8TestInterface.h:
142         (WebCore::V8TestInterface::wrap):
143         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
144         (WebCore::V8TestMediaQueryListListener::wrap):
145         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
146         (WebCore::V8TestNamedConstructor::wrap):
147         * bindings/scripts/test/V8/V8TestNode.cpp:
148         (WebCore::V8TestNode::constructorCallback):
149         (WebCore::V8TestNode::wrapSlow):
150         * bindings/scripts/test/V8/V8TestObj.cpp:
151         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
152         * bindings/scripts/test/V8/V8TestObj.h:
153         (WebCore::V8TestObj::wrap):
154         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
155         (WebCore::V8TestSerializedScriptValueInterface::wrap):
156         * bindings/v8/DOMDataStore.cpp:
157         (WebCore::DOMDataStore::current):
158         * bindings/v8/DOMDataStore.h:
159         (WebCore::DOMDataStore::get):
160         (DOMDataStore):
161         * bindings/v8/V8DOMWrapper.cpp:
162         * bindings/v8/V8DOMWrapper.h:
163         (V8DOMWrapper):
164         (WebCore::V8DOMWrapper::setJSWrapperPrivate):
165         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
166         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
167         (WebCore::v8HTMLImageElementConstructorCallback):
168
169 2012-11-06  Ken Buchanan  <kenrb@chromium.org>
170
171         Crash due to column span under button element
172         https://bugs.webkit.org/show_bug.cgi?id=101402
173
174         Reviewed by Abhishek Arya.
175
176         When there is a column-spanning child of a RenderButton
177         splitBlocks() must split the RenderButton as well as its
178         only permitted direct child, the anonymous block referenced
179         by m_inner. A crash was occurring because splitBlocks()
180         calls addChildIgnoringAnonymousColumnBlocks() to add the
181         cloned m_inner to the cloned RenderButton, which meant the
182         m_inner for the cloned RenderButton was not being set even
183         though a child was being added. This violates state
184         assumptions in the RenderButton code.
185
186         This patch prevents any descendants of RenderButton from
187         spanning columns. Also, it adds a precautionary check in
188         RenderButton::removeChild() to mitigate problems if similar
189         state problems are found in future.
190
191         * rendering/RenderBlock.cpp:
192         (WebCore::RenderBlock::containingColumnsBlock):
193         * rendering/RenderButton.cpp:
194         (WebCore::RenderButton::removeChild):
195
196 2012-11-06  Shinya Kawanaka  <shinyak@chromium.org>
197
198         [Shadow] Pseudo custom-elements should start with 'x-'.
199         https://bugs.webkit.org/show_bug.cgi?id=100919
200
201         Reviewed by Dimitri Glazkov.
202
203         Pseuco custom-elements should start with 'x-'. 'Pseudo' starting with '-webkit-' should work
204         only in UserAgent ShadowDOM. If it's used in Author ShadowDOM, it should not work.
205
206         Test: fast/dom/shadow/pseudo-attribute-rendering.html
207
208         * css/SelectorChecker.cpp:
209         (WebCore::SelectorChecker::checkSelector): Added ShadowRoot type check.
210
211 2012-11-06  Chris Evans  <cevans@google.com>
212
213         Re-order variables in BidiRun and LayoutState
214         https://bugs.webkit.org/show_bug.cgi?id=100173
215
216         Reviewed by Eric Seidel.
217
218         The variable re-ordering and use of bitfields for bools has two benefits:
219         1) Size reduction. sizeof(BidiRun) goes down from 48 to 40 bytes on 64-bit. This is achieved by removing a bool member variable from BidiRun and packing it together with other bools in the BidiCharacterRun base class.
220         2) Security improvement. We have a lot of use-after-free in the RenderObject hierarchy, and the RenderArena class protects us from a lot of trouble by ensuring that objects of arbitrary type cannot be overlayed on top of freed RenderObjects. This change additionally makes sure that non-virtual RenderArena allocated objects do not have member variables which fully overlap the freed vtable pointer. This leaves re-used vtable pointers always pointing to either a valid vtable or an invalid address due to the freelist high-bit poisoning.
221
222         This change is exclusively about size savings; it is performance neutral as you would expect, including on Parser/html5-full-render.html
223
224         * platform/text/BidiResolver.h:
225         (WebCore::BidiCharacterRun::BidiCharacterRun): impact from re-ordering members.
226         (BidiCharacterRun): provide an efficiently packed bit of storage for BidiRun subclass to use, and re-order members to place bools adjacent.
227         * rendering/BidiRun.h:
228         (WebCore::BidiRun::BidiRun): use base class' efficiently packed bit storage for m_hasHyphen.
229         (BidiRun): m_hasHyphen is now stored in the base class.
230         * rendering/LayoutState.cpp:
231         (WebCore::LayoutState::LayoutState):
232         * rendering/LayoutState.h:
233         (WebCore::LayoutState::LayoutState): impact from re-ordering members.
234         (LayoutState): re-order members to place bools adjacently.
235
236 2012-11-06  Kent Tamura  <tkent@chromium.org>
237
238         [Chromium-win] Refactor date/time format conversion code in LocaleWin
239         https://bugs.webkit.org/show_bug.cgi?id=101329
240
241         Reviewed by Kentaro Hara.
242
243         convertWindowsDateFormatToLDML and convertWindowsTimeFormatToLDML did
244         similar jobs with different code. We can merge them into one function.
245
246         As for the date format conversion, we have tokenized a format string and
247         stored token objects into a vector. We skip token object generation and
248         generate a LDML-compliant pattern string during parsing.
249
250         No new tests. This should make no behavior changes and
251         WebKit/chromium/tests/LocaleWinTest.cpp has test cases.
252
253         * platform/text/win/LocaleWin.cpp:
254         (WebCore): Remove DateFormatToken, isFooSymbol, ensureShortDateTokens,
255         convertWindowsDateFormatToLDML, mapCharacterToDateTimeFieldType, and
256         convertWindowsTimeFormatToLDML.
257         (WebCore::commitLiteralToken): Store the result to the specified StringBuilder.
258         (WebCore::convertWindowsDateTimeFormat):
259         Renamed from parseDateFormat, and supports time format symbols.
260         (WebCore::LocaleWin::dateFormat): Use convertWindowsDateTimeFormat.
261         (WebCore::LocaleWin::monthFormat): Ditto.
262         (WebCore::LocaleWin::timeFormat): Ditto.
263         (WebCore::LocaleWin::shortTimeFormat): Ditto.
264         * platform/text/win/LocaleWin.h:
265         (LocaleWin): Remove ensureShortDateTokens and m_shortDateTokens.
266
267 2012-11-06  Elliott Sprehn  <esprehn@chromium.org>
268
269         Make Document::renderer faster by using the cached ptr for RenderView
270         https://bugs.webkit.org/show_bug.cgi?id=101409
271
272         Reviewed by Eric Seidel.
273
274         In Bug 101277 I made Document::renderView() just return m_renderView instead
275         of casting the result of renderer(). While this made renderView() cheaper it
276         makes more sense to just make renderer() faster for Document pointers and
277         go back to the out of line method in RenderView.h because lots of places in
278         the code do document()->renderer().
279
280         No new tests, this is just a refactor.
281
282         * dom/Document.h:
283         (WebCore::Document::renderer):
284         * rendering/RenderView.h:
285         (WebCore::Document::renderView):
286
287 2012-11-06  Adam Barth  <abarth@webkit.org>
288
289         [V8] neuterBinding should remember the type of its argument
290         https://bugs.webkit.org/show_bug.cgi?id=101413
291
292         Reviewed by Kentaro Hara.
293
294         This is a small part of the patch in
295         https://bugs.webkit.org/show_bug.cgi?id=101110 that we can land
296         separately to try to tease out what is causing the memory regression.
297
298         * bindings/v8/SerializedScriptValue.cpp:
299         (WebCore):
300         (WebCore::neuterBinding):
301
302 2012-11-06  Alexey Proskuryakov  <ap@apple.com>
303
304         Clean up which storage cookie jar functions use
305         https://bugs.webkit.org/show_bug.cgi?id=101395
306
307         Reviewed by Brady Eidson.
308
309         * WebCore.exp.in:
310         * platform/mac/WebCoreSystemInterface.h:
311         * platform/mac/WebCoreSystemInterface.mm:
312         Updated for two new WKSI functions.
313
314         * platform/CookieJar.h: Added explanatory comments.
315
316         * platform/mac/CookieJar.mm:
317         (WebCore::cookies): Removed fallback on NSHTTPCookieStorage, the WKSI function
318         already implements it.
319         (WebCore::cookieRequestHeaderFieldValue): Ditto.
320         (WebCore::setCookies): Ditto.
321         (WebCore::cookiesEnabled): Ditto.
322         (WebCore::getRawCookies): Ditto.
323         (WebCore::deleteCookie): Ditto.
324         (WebCore::getHostnamesWithCookies): This function used to look at NSHTTPCookieStorage
325         exclusively. While it makes sense to bypass private storage session, default storage
326         session (currently only used for testing on Mac) is never OK to bypass. Changed to
327         use a WKSI function that supports both.
328         (WebCore::deleteCookiesForHostname): Ditto.
329         (WebCore::deleteAllCookies): Ditto.
330
331         * platform/network/cf/CookieJarCFNet.cpp:
332         (WebCore::getHostnamesWithCookies):
333         (WebCore::deleteCookiesForHostname):
334         (WebCore::deleteAllCookies):
335         Updated to match Foundation, so now these functions bypass private session.
336
337         * platform/network/cf/CookieStorageCFNet.cpp:
338         (WebCore::currentCFHTTPCookieStorage): Updated a comment.
339         (WebCore::defaultCFHTTPCookieStorage):  Added a function that returns cookie storage
340         for non-private session (or null if that would be an NSHTTPCookieStorage).        
341         (WebCore::startObservingCookieChanges): We do not want to observe private cookies
342         here, and we certainly don't want a mismatch between start/stop due to private
343         browsing mode changes.
344         (WebCore::stopObservingCookieChanges): Ditto.
345
346         * platform/network/cf/CookieStorageCFNet.h: Added defaultCFHTTPCookieStorage().
347
348 2012-11-06  Huang Dongsung  <luxtella@company100.net>
349
350         Build fix. r133601 broke the Windows build.
351         https://bugs.webkit.org/show_bug.cgi?id=101404
352
353         Reviewed by Noam Rosenthal.
354
355         Only static const integral data members can be initialized within a class in the
356         Windows, so we initialize static const double date members out of the class.
357
358         * platform/graphics/texmap/TextureMapper.cpp:
359         (BitmapTexturePool):
360         (WebCore):
361
362 2012-11-06  Simon Fraser  <simon.fraser@apple.com>
363
364         -webkit-background-clip:text produces artifacts when applied to the body and the browser is resized
365         https://bugs.webkit.org/show_bug.cgi?id=89287
366
367         Reviewed by Beth Dakin.
368
369         If the body had -webkit-background-clip: text, we'd fail to paint
370         anything behind it, so would see garbage pixels.
371         
372         Fix by having RenderView::paintBoxDecorations() check for a background-clip of "text"
373         on the renderer that paints the root background.
374         
375         Added some new pixel tests for combinations of html and body transform
376         and backgrounds; earlier versions of the patch broke some of these tests.
377
378         Tests: fast/backgrounds/background-clip-text-on-body.html
379                fast/backgrounds/transformed-body-background.html
380                fast/backgrounds/transformed-body-html-background.html
381                fast/backgrounds/transformed-html-body-background.html
382
383         * rendering/RenderView.cpp:
384         (WebCore::rendererObscuresBackground): Broke up the single condition
385         into early 'false' returns when possible. We need to also check whether
386         the renderer that actually paints the background (which might be the body)
387         will fill it; background-clip: text does not.
388         (WebCore::RenderView::paintBoxDecorations): Rather than checking firstChild(),
389         actually check the root renderer, so that we can reliably get to the renderer
390         that mains the root background.
391
392 2012-11-06  Stephen White  <senorblanco@chromium.org>
393
394         Implement save and restore for a bunch of InternalSettings state
395         https://bugs.webkit.org/show_bug.cgi?id=101394
396
397         Reviewed by Dirk Pranke.
398
399         In http://trac.webkit.org/changeset/133399, I resolved a bunch of 
400         flaky tests by saving and restoring the InternalSettings state
401         EnableCompositingForFixedPosition.  On a hunch, I git grepped for all
402         internal settings state which is being set by layout tests but not
403         saved and restored.  It turns out there about 15 calls.
404
405         This patch takes care of five of them, mostly compositing-related.
406         The others I was either not sure about, or were already at least
407         being reset to known values by the testing harness.
408
409         Hopefully this will alleviate some further test flakiness.
410
411         * testing/InternalSettings.cpp:
412         * testing/InternalSettings.h:
413
414 2012-11-06  KyungTae Kim  <ktf.kim@samsung.com>
415
416         Fix build warning in RenderLayer.cpp caused by r133628
417         https://bugs.webkit.org/show_bug.cgi?id=101401
418
419         Reviewed by Simon Fraser.
420
421         The static function WebCore::frameViewFromLayer is only used when USE(ACCELERATED_COMPOSITING),
422         so define it only that case for removing -Wunused-function warning
423
424         * rendering/RenderLayer.cpp:
425         (WebCore):
426
427 2012-11-06  Hans Muller  <hmuller@adobe.com>
428
429         [CSS Exclusions] Store ExclusionPolygonEdge vertices in clockwise order
430         https://bugs.webkit.org/show_bug.cgi?id=100763
431
432         Reviewed by Darin Adler.
433
434         The ExclusionPolygon's internal logic, notably getVertexIntersectionVertices(),
435         assumes that ExclusionPolygonEdge vertices are stored in clockwise order.
436         If this is not true, then we construct the polygon's edges in reverse.
437
438         To determine if the vertices are in clockwise order, we compare the slope
439         of the line between the top,left vertex and its previous vertex, with the
440         the slope of the line of vertices before and after the top,left vertex.
441         If the slope of the latter is greater, then top,left vertex is located
442         to its left, and the vertices are clockwise.
443
444         Test: fast/exclusions/shape-inside/shape-inside-counterclockwise-polygon.html
445
446         * rendering/ExclusionPolygon.cpp:
447         (WebCore::determinant): Used to decide if the min vertex is on the left side of the line that passes through its adjacent vertices.
448         (WebCore::ExclusionPolygon::ExclusionPolygon): If the polygon's vertices are specified in counterclockwise order, construct the edges in reverse.
449         (WebCore::appendIntervalX): Made this an inline since it was only defined as a function for the sake of clarity.
450
451 2012-11-06  Tiancheng Jiang  <tijiang@rim.com>
452
453         [BlackBerry] Update BB10 form theme.
454         https://bugs.webkit.org/show_bug.cgi?id=100760
455
456         Reviewed by Rob Buis.
457
458         RIM PR 238123
459         Internal Reviewed by Chris Hutten-Czapski
460         BB10 selection theme use slice image function to draw selection button,
461         any border-radius setting other than 0 will make the button corner
462         clipped. Always set button border-radius: 0 for BB10 theme.
463
464         * css/themeBlackBerry.css:
465         (select[size][multiple]):
466         (select[size="1"]):
467
468 2012-11-06  Elliott Sprehn  <esprehn@chromium.org>
469
470         Remove branch from inside RenderObject::view now that renderer() is more expensive
471         https://bugs.webkit.org/show_bug.cgi?id=101277
472
473         Reviewed by Eric Seidel.
474
475         It was observed in Bug 100057 that calling renderer() repeatedly now that it has a branch
476         can be a performance regression. Now that we no longer keep a separate pointer for rare data
477         in Document, we can use that space for a pointer to the RenderView making RenderObject::view()
478         faster and removing the branch.
479
480         This is a 1% improvement on Parser/html5-full-render.html
481
482         This also cleans up the code because it turns out we don't need to have RenderObject::view() in
483         RenderView.h because we can just call Document::renderView() and not do toRenderView. This makes
484         it easier to find this method as it exists in the right header file now.
485
486         No new tests, this is just a refactor.
487
488         * WebCore.exp.in: Remove export of Document::renderView since it's inline now.
489         * dom/Document.cpp:
490         (WebCore::Document::Document):
491         (WebCore::Document::setRenderer):
492         (WebCore):
493         * dom/Document.h:
494         (WebCore::Document::renderView):
495         (Document):
496         * rendering/RenderObject.h:
497         (WebCore::RenderObject::view):
498         * rendering/RenderView.h:
499         (WebCore):
500
501 2012-11-06  Sheriff Bot  <webkit.review.bot@gmail.com>
502
503         Unreviewed, rolling out r133526.
504         http://trac.webkit.org/changeset/133526
505         https://bugs.webkit.org/show_bug.cgi?id=101388
506
507         May have caused 15% memory regression in Chromium (Requested
508         by jsbell|gardener on #webkit).
509
510         * UseV8.cmake:
511         * WebCore.gypi:
512         * bindings/scripts/CodeGeneratorV8.pm:
513         (GenerateHeader):
514         (GenerateNormalAttrGetter):
515         (GenerateConstructorCallback):
516         (GenerateNamedConstructorCallback):
517         (GenerateToV8Converters):
518         (GetDomMapFunction):
519         (GetDomMapName):
520         * bindings/scripts/test/V8/V8Float64Array.h:
521         (WebCore::V8Float64Array::wrap):
522         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
523         (WebCore::V8TestActiveDOMObject::wrap):
524         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
525         (WebCore::V8TestCustomNamedGetter::wrap):
526         * bindings/scripts/test/V8/V8TestEventConstructor.h:
527         (WebCore::V8TestEventConstructor::wrap):
528         * bindings/scripts/test/V8/V8TestEventTarget.h:
529         (WebCore::V8TestEventTarget::wrap):
530         * bindings/scripts/test/V8/V8TestException.h:
531         (WebCore::V8TestException::wrap):
532         * bindings/scripts/test/V8/V8TestInterface.h:
533         (WebCore::V8TestInterface::wrap):
534         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
535         (WebCore::V8TestMediaQueryListListener::wrap):
536         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
537         (WebCore::V8TestNamedConstructor::wrap):
538         * bindings/scripts/test/V8/V8TestNode.cpp:
539         (WebCore::V8TestNode::constructorCallback):
540         (WebCore::V8TestNode::wrapSlow):
541         * bindings/scripts/test/V8/V8TestObj.cpp:
542         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
543         * bindings/scripts/test/V8/V8TestObj.h:
544         (WebCore::V8TestObj::wrap):
545         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
546         (WebCore::V8TestSerializedScriptValueInterface::wrap):
547         * bindings/v8/DOMDataStore.cpp:
548         (WebCore::DOMDataStore::DOMDataStore):
549         (WebCore::DOMDataStore::~DOMDataStore):
550         (WebCore::DOMDataStore::current):
551         (WebCore::DOMDataStore::reportMemoryUsage):
552         * bindings/v8/DOMDataStore.h:
553         (WebCore::DOMDataStore::domNodeMap):
554         (WebCore::DOMDataStore::domObjectMap):
555         (DOMDataStore):
556         * bindings/v8/DOMWrapperMap.h:
557         (WebCore):
558         (DOMWrapperMap):
559         (WebCore::DOMWrapperMap::~DOMWrapperMap):
560         (WebCore::DOMWrapperHashMap::remove):
561         * bindings/v8/DOMWrapperWorld.h:
562         * bindings/v8/IntrusiveDOMWrapperMap.h: Copied from Source/WebKit/chromium/src/WebScriptController.cpp.
563         (WebCore):
564         (IntrusiveDOMWrapperMap):
565         (WebCore::IntrusiveDOMWrapperMap::weakCallback):
566         * bindings/v8/ScriptProfiler.cpp:
567         * bindings/v8/SerializedScriptValue.cpp:
568         (WebCore::neuterBinding):
569         * bindings/v8/V8DOMMap.cpp: Copied from Source/WebKit/chromium/src/WebScriptController.cpp.
570         (WebCore):
571         (WebCore::getDOMNodeMap):
572         (WebCore::getDOMObjectMap):
573         * bindings/v8/V8DOMMap.h: Copied from Source/WebKit/chromium/src/WebScriptController.cpp.
574         (WebCore):
575         * bindings/v8/V8DOMWindowShell.cpp:
576         * bindings/v8/V8DOMWrapper.cpp:
577         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
578         (WebCore):
579         * bindings/v8/V8DOMWrapper.h:
580         (V8DOMWrapper):
581         (WebCore::V8DOMWrapper::getCachedWrapper):
582         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
583         * bindings/v8/V8GCController.cpp:
584         * bindings/v8/V8NPObject.cpp:
585         * bindings/v8/WorkerContextExecutionProxy.cpp:
586         * bindings/v8/WorkerScriptController.cpp:
587         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
588         (WebCore::v8HTMLImageElementConstructorCallback):
589
590 2012-11-06  Alexey Proskuryakov  <ap@apple.com>
591
592         Some cookie code cleanup
593         https://bugs.webkit.org/show_bug.cgi?id=101375
594
595         Reviewed by Dan Bernstein.
596
597         * platform/CookieJar.h: Fixed style. Grouped functions by which storage they operate
598         on in Mac port, but didn't add explanatory comments yet, because this is different
599         in some ports.
600
601         * platform/mac/CookieJar.mm:
602         (WebCore): Removed special code for isHTTPOnly, it's present in Foundation in all
603         supported OS X versions.
604         (WebCore::filterCookies): Use -isHTTPOnly directly.
605         (WebCore::cookies): Get rid of a variable for URL, implicit conversion works just as well.
606         (WebCore::cookieRequestHeaderFieldValue): Ditto.
607         (WebCore::setCookies): Assert that no more than one cookie was created from one
608         Set-Cookie header, document.cookie can only be used to set one cookie at a time.
609         (WebCore::getRawCookies): Removed useless local variables.
610
611         * platform/network/CookieStorage.h: Removed an unneeded include, clarified a comment.
612
613         * platform/network/HTTPHeaderMap.h: Added a FIXME.
614
615 2012-11-06  John Griggs  <jgriggs@rim.com>
616
617         Implement MediaPlayerPrivate::didLoadingProgress for BlackBerry platform
618         https://bugs.webkit.org/show_bug.cgi?id=100378
619
620         Reviewed by Eric Carlson.
621
622         Implement this method for BlackBerry platform.
623
624         New test: LayoutTests/media/progress-events-generated-correctly.html
625
626         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
627         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
628         (WebCore::MediaPlayerPrivate::didLoadingProgress):
629         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
630         (MediaPlayerPrivate):
631
632 2012-11-06  Adam Barth  <abarth@webkit.org>
633
634         DOMImplementation should use ScriptWrappable
635         https://bugs.webkit.org/show_bug.cgi?id=101279
636
637         Reviewed by Eric Seidel.
638
639         This patch makes DOMImplementation ScriptWrappable. Both the V8 and JSC
640         bindings automatically detect the presence of this base class and use
641         it to optimize getting and setting JavaScript wrappers.
642
643         This patch is a 23% progression on Bindings/document-implementation for
644         the V8 bindings and a 69% progression for the JSC bindings.
645
646         * dom/DOMImplementation.h:
647
648 2012-11-06  Benjamin Poulain  <benjamin@webkit.org>
649
650         Speed up TransformationMatrix::multiply() on modern ARM
651         https://bugs.webkit.org/show_bug.cgi?id=101084
652
653         Reviewed by Gavin Barraclough.
654
655         The main improvements are:
656         -Store the full source matrix in the registers d16 to d31. This way we avoid going
657          back and forth to memory to use the operands.
658          Since the full matrix is in register, we can also directly modify the memory of m_matrix,
659          we no longer need the temporary matrix memcopied at the end.
660         -Use of LoadMultiple and StoreMultiple to load-store the matrix parameters.
661         -Use Multiply-Accumulate instead of VMUL followed by VADD. This half the number of instruction.
662         -On regular ARMv7, using a loop to reuse the same code for each row also improve the performance.
663
664         Depending on the hardware, the new code takes 20% to 42% less time than the basic implementation.
665
666         * platform/graphics/transforms/TransformationMatrix.cpp:
667         (WebCore::TransformationMatrix::multiply):
668         * platform/graphics/transforms/TransformationMatrix.h:
669         (TransformationMatrix):
670
671 2012-11-06  Sheriff Bot  <webkit.review.bot@gmail.com>
672
673         Unreviewed, rolling out r133529 and r133562.
674         http://trac.webkit.org/changeset/133529
675         http://trac.webkit.org/changeset/133562
676         https://bugs.webkit.org/show_bug.cgi?id=101371
677
678         Caused 15% memory regression on Chromium page cyclers
679         (Requested by jsbell|gardener on #webkit).
680
681         * platform/text/LineBreakIteratorPoolICU.h:
682         (WebCore::LineBreakIteratorPool::take):
683         (WebCore::LineBreakIteratorPool::put):
684         (LineBreakIteratorPool):
685         * platform/text/TextBreakIterator.cpp:
686         (WebCore::acquireLineBreakIterator):
687         * platform/text/TextBreakIterator.h:
688         (WebCore):
689         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
690         (WebCore::LazyLineBreakIterator::get):
691         (WebCore::LazyLineBreakIterator::reset):
692         (LazyLineBreakIterator):
693         * platform/text/TextBreakIteratorICU.cpp:
694         (WebCore::acquireLineBreakIterator):
695         (WebCore::releaseLineBreakIterator):
696         * platform/text/gtk/TextBreakIteratorGtk.cpp:
697         (WebCore::setUpIterator):
698         (WebCore::acquireLineBreakIterator):
699         * platform/text/wince/TextBreakIteratorWinCE.cpp:
700         (WebCore::acquireLineBreakIterator):
701         * rendering/RenderBlockLineLayout.cpp:
702         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
703         * rendering/RenderText.cpp:
704         (WebCore::RenderText::computePreferredLogicalWidths):
705         * rendering/RenderText.h:
706         (WebCore):
707         * rendering/break_lines.cpp:
708         (WebCore):
709         (WebCore::isBreakableSpace):
710         (WebCore::needsLineBreakIterator):
711         (WebCore::nextBreakablePosition):
712         (WebCore::nextBreakablePositionIgnoringNBSP):
713         * rendering/break_lines.h:
714         (WebCore):
715         (WebCore::isBreakable):
716
717 2012-11-06  Peter Beverloo  <peter@chromium.org>
718
719         [Chromium] Enable the JavaScript i18n API for Android
720         https://bugs.webkit.org/show_bug.cgi?id=101357
721
722         Reviewed by Adam Barth.
723
724         Remove the conditional dependency on the v8-i18n API. The library is now
725         always available in a Chromium for Android checkout.
726
727         * WebCore.gyp/WebCore.gyp:
728
729 2012-11-06  Adam Barth  <abarth@webkit.org>
730
731         ScriptWrappable should work for more than just Node
732         https://bugs.webkit.org/show_bug.cgi?id=101319
733
734         Reviewed by Eric Seidel.
735
736         This patch generalizes the inline cached wrapper code path to work with
737         all subclasses of ScriptWrappable, not just Node.
738
739         * bindings/js/JSDOMBinding.h:
740         (WebCore::setInlineCachedWrapper):
741         (WebCore::getInlineCachedWrapper):
742         (WebCore):
743         (WebCore::clearInlineCachedWrapper):
744         (WebCore::cacheWrapper):
745         * bindings/js/JSNodeCustom.h:
746
747 2012-11-06  Tiancheng Jiang  <tijiang@rim.com>
748
749         [BlackBerry] Update BB10 form theme.
750         https://bugs.webkit.org/show_bug.cgi?id=100760
751
752         Reviewed by Rob Buis.
753
754         Revert webkit/ce306dcc698199a6f7ce679daf0a30c25d3a3d43 slider theme
755         change which break media control and vertical slider.
756
757         RIM PR 236993
758         Internal Reviewed by Jeff Rogers.
759
760         * platform/blackberry/RenderThemeBlackBerry.cpp:
761         (WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
762         (WebCore::RenderThemeBlackBerry::paintSliderThumb):
763
764 2012-11-06  Michael Saboff  <msaboff@apple.com>
765
766         canonicalizedTitle() shouldn't convert 8 bit title strings to 16 bit
767         https://bugs.webkit.org/show_bug.cgi?id=101105
768
769         Reviewed by Darin Adler.
770
771         Turned canonicalizedTitle() into a templated function based on character type.
772         Changed call in updateTitle() to check the bitness of the title string to call
773         the right template flavor of canonicalizedTitle().
774         Made supporting changes by adding displayBufferModifiedByEncoding(LChar*, ...)
775         and made TextEncoding::displayBuffer() a templated function as well.
776
777         No new tests needed, as functionality is unchanged.
778
779         * dom/Document.cpp:
780         (WebCore::canonicalizedTitle):
781         (WebCore::Document::updateTitle):
782         (WebCore::Document::displayBufferModifiedByEncodingInternal):
783         * dom/Document.h:
784         (WebCore::Document::displayBufferModifiedByEncoding):
785         * platform/text/TextEncoding.h:
786         (TextEncoding):
787         (WebCore::TextEncoding::displayBuffer):
788
789 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
790
791         Fix RenderGeometryMap assertion when layers are scrolled during layout
792         https://bugs.webkit.org/show_bug.cgi?id=101292
793
794         Reviewed by Beth Dakin.
795
796         When we set RenderLayer scroll positions as part of layout, we don't want
797         to update compositing layers right away. Updating compositing layers
798         requires that the entire layer tree has been updated from renderers,
799         so that the geometry of all RenderLayers can be trusted. When this state
800         was violated, RenderGeometryMap asserts.
801         
802         Fix by bailing from updateCompositingLayersAfterScroll() if FrameView
803         tells us that we're doing layout. A full update of the compositing layers
804         will happen later anyway.
805
806         Test: compositing/geometry/geometry-map-scroll-during-layout-assertion.html
807
808         * rendering/RenderLayer.cpp:
809         (WebCore::frameViewFromLayer):
810         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
811
812 2012-11-06  Michael Saboff  <msaboff@apple.com>
813
814         quoteCSSString() always creates a 16 bit string
815         https://bugs.webkit.org/show_bug.cgi?id=101004
816
817         Reviewed by Darin Adler.
818
819         Added a new templated helper based on character type from the logic of quoteCSSString() to process
820         the argument string based on its native bitness.
821
822         Functionality covered by existing tests.
823
824         * css/CSSParser.cpp:
825         (WebCore::quoteCSSStringInternal):
826         (WebCore::quoteCSSString):
827
828 2012-11-06  Andras Becsi  <andras.becsi@digia.com>
829
830         [Qt][WK2] Fit-to-width broken on pages with viewport meta tag
831         https://bugs.webkit.org/show_bug.cgi?id=99715
832
833         Reviewed by Jocelyn Turcotte.
834
835         Add a bool that indicates if the content had an explicit
836         initial-scale in the viewport meta tag.
837
838         * dom/ViewportArguments.cpp:
839         (WebCore::computeViewportAttributes):
840         * dom/ViewportArguments.h:
841         (ViewportAttributes):
842
843 2012-11-06  Mike West  <mkwst@chromium.org>
844
845         CSP 1.1: Tweak the script interface to match the spec.
846         https://bugs.webkit.org/show_bug.cgi?id=101321
847
848         Reviewed by Adam Barth.
849
850        This patch brings WebKit in line with the changes made to the spec in
851        https://dvcs.w3.org/hg/content-security-policy/rev/5a29424a37d4.
852        Specifically, the following:
853
854        - Renamed 'document.SecurityPolicy' to 'document.securityPolicy'
855        - Converted the following to read-only boolean attributes:
856          - 'allowsEval'
857          - 'allowsInlineScript'
858          - 'allowsInlineStyle'
859          - 'isActive'
860
861         These changes only have effect for ports with CSP_NEXT enabled.
862
863         Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinescript.html
864                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinestyle.html
865
866         * dom/Document.idl:
867         * page/DOMSecurityPolicy.idl:
868             Tweaking the IDL files to match the new definition of the
869             functionlity in the spec.
870
871 2012-11-06  Andrey Lushnikov  <lushnikov@google.com>
872
873         Added console.clear() method
874
875         Web Inspector: add console.clear()
876         https://bugs.webkit.org/show_bug.cgi?id=101021
877
878         Reviewed by Vsevolod Vlasov.
879
880         Adds native implementation of console.clear
881
882         Test: inspector/console/console-clear-function.html
883
884         * English.lproj/localizedStrings.js: Adds 'Console was cleared' string
885         * inspector/ConsoleMessage.cpp:
886         (WebCore::messageTypeValue): Adds ClearMessageType
887         * inspector/Inspector.json:
888         * inspector/InspectorConsoleAgent.cpp:
889         (WebCore::InspectorConsoleAgent::addMessageToConsole):
890         * inspector/front-end/ConsoleMessage.js:
891         (WebInspector.ConsoleMessageImpl.prototype._formatMessage): Display strategy for "clear" message
892         * inspector/front-end/ConsoleModel.js:
893         * inspector/front-end/inspector.css:
894         (.console-info): Adds style for the 'console was cleared' message
895         * page/Console.cpp: backend binging for console.clear()
896         (WebCore::Console::clear):
897         (WebCore):
898         * page/Console.h:
899         (Console):
900         * page/Console.idl: Adds 'clear' message to protocol
901         * page/ConsoleTypes.h:
902
903 2012-11-06  Aaron Colwell  <acolwell@chromium.org>
904
905         Heap-buffer-overflow in WebCore::TextTrackCueList::add
906         https://bugs.webkit.org/show_bug.cgi?id=101018
907
908         Reviewed by Eric Carlson.
909
910         Added an extra check to avoid using a negative array index when a cue
911         is added to the beginning of the list.
912
913         Test case added to LayoutTests/media/track/track-add-remove-cue.html.
914
915         * html/track/TextTrackCueList.cpp:
916         (WebCore::TextTrackCueList::add):
917
918 2012-11-06  Aaron Colwell  <acolwell@chromium.org>
919
920         Regression(r132681): Heap-use-after-free in WebCore::RenderTextTrackCue::layout
921         https://bugs.webkit.org/show_bug.cgi?id=100981
922
923         Reviewed by Eric Carlson.
924
925         Fixing a TextTrackCue use after free bug. textTrackRemoveCues() needs to be called when
926         an HTMLTrackElement is removed from an HTMLMediaElement so that references to
927         TextTrackCues are removed from m_cueTree.
928
929         Test: media/track/track-remove-by-setting-innerHTML.html
930
931         * html/HTMLMediaElement.cpp:
932         (WebCore::HTMLMediaElement::willRemoveTrack):
933
934 2012-10-23  Stephen White  <senorblanco@chromium.org>
935
936         [skia] Implement reference (url) filters on composited layers.
937         https://bugs.webkit.org/show_bug.cgi?id=100142
938
939         Reviewed by James Robinson.
940
941         Covered by css3/filters/effect-reference-hw.html
942
943         * WebCore.gyp/WebCore.gyp:
944         * WebCore.gypi:
945         Add new files.
946         * WebCore.xcodeproj/project.pbxproj:
947         Mark FilterEffect.h as "private".
948         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
949         (WebCore::GraphicsLayerChromium::setFilters):
950         Use the new SkImageFilter builder and setLayer() infrastructure, but
951         only if there's a reference filter in the chain.
952         * platform/graphics/filters/FEBlend.h:
953         * platform/graphics/filters/FEColorMatrix.h:
954         * platform/graphics/filters/FEGaussianBlur.h:
955         * platform/graphics/filters/FELighting.h:
956         * platform/graphics/filters/FEMorphology.h:
957         * platform/graphics/filters/FilterEffect.h:
958         (WebCore::FilterEffect::createImageFilter):
959         Add createImageFilter() factory function for building SkImageFilters.
960         * platform/graphics/filters/FilterOperation.h:
961         (WebCore::FilterOperation::ReferenceFilterOperation::filterEffect):
962         (WebCore::FilterOperation::ReferenceFilterOperation::setFilterEffect):
963         Add a FilterEffect member to ReferenceFilterOperation, and accessors
964         for it.
965         * platform/graphics/filters/skia/FEBlendSkia.cpp:
966         (WebCore::FEBlend::createImageFilter):
967         Implement SkImageFilter building for FEBlend filter.
968         * platform/graphics/filters/skia/FEColorMatrixSkia.cpp:
969         (WebCore::createColorFilter):
970         (WebCore::FEColorMatrix::platformApplySkia):
971         Refactor creation of SkColorFilter from an FEColorMatrix filter.
972         (WebCore::FEColorMatrix::createImageFilter):
973         Implement SkImageFilter building for FEColorMatrix filter.
974         * platform/graphics/filters/skia/FEGaussianBlurSkia.cpp:
975         (WebCore::FEGaussianBlur::createImageFilter):
976         Implement SkImageFilter building for FEGaussianBlur filter.
977         * platform/graphics/filters/skia/FELightingSkia.cpp:
978         (WebCore::FELighting::createImageFilter):
979         Implement SkImageFilter building for FELighting filters.
980         * platform/graphics/filters/skia/FEMorphologySkia.cpp:
981         (WebCore::FEMorphology::createImageFilter):
982         Implement SkImageFilter building for FEMorphology filter.
983         * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp: Added.
984         (WebCore::SkiaImageFilterBuilder::SkiaImageFilterBuilder):
985         (WebCore::SkiaImageFilterBuilder::build):
986         * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
987         Implement new helper class for building an SkImageFilter DAG from
988         a FilterEffect DAG.  Can also build from FilterOperations list.
989         * rendering/FilterEffectRenderer.cpp:
990         (WebCore::FilterEffectRenderer::build):
991         When building FilterEffects from a reference filter, also store the
992         generated DAG on the ReferenceFilterOperation itself.
993         * rendering/RenderLayer.cpp:
994         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
995         Even when in composited mode, if there's a reference filter in the 
996         chain, build the FilterEffect DAG from it.
997
998 2012-11-06  Max Feil  <mfeil@rim.com>
999
1000         [BlackBerry] Automatically go fullscreen on video play
1001         https://bugs.webkit.org/show_bug.cgi?id=101100
1002
1003         Reviewed by Eric Carlson.
1004
1005         There is a requirement to have HTML5 video automatically enter
1006         fullscreen when a video starts playing (PR131774). This change
1007         implements this feature, with restrictions. The main restriction
1008         is adherence to WebKit's philosophy of only entering fullscreen
1009         due to a user gesture. This is important in order to avoid
1010         pop-up advertisements and other unwanted fullscreen content.
1011         One consequence of this is that video elements with the autoplay
1012         attribute will not automatically enter fullscreen.
1013
1014         Other caveats:
1015         - This feature applies only to "small screen" devices where
1016         automatically going fullscreen makes more sense.
1017         - Fullscreen will only be entered automatically when the
1018         video is played from the beginning (current time is zero).
1019         It is assumed that if the user is resuming play from a paused
1020         state and is not in fullscreen mode, then they exited fullscreen
1021         mode intentionally.
1022
1023         Test: platform/blackberry/media/video-automatic-fullscreen.html
1024
1025         * html/HTMLMediaElement.cpp:
1026         (WebCore::HTMLMediaElement::mediaPlayerEnterFullscreen):
1027         (WebCore):
1028         (WebCore::HTMLMediaElement::mediaPlayerIsFullscreen):
1029         (WebCore::HTMLMediaElement::mediaPlayerIsFullscreenPermitted):
1030         * html/HTMLMediaElement.h:
1031         (HTMLMediaElement):
1032         * platform/graphics/MediaPlayer.h:
1033         (WebCore::MediaPlayerClient::mediaPlayerEnterFullscreen):
1034         (WebCore::MediaPlayerClient::mediaPlayerIsFullscreen):
1035         (WebCore::MediaPlayerClient::mediaPlayerIsFullscreenPermitted):
1036         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1037         (WebCore::MediaPlayerPrivate::play):
1038         (WebCore::MediaPlayerPrivate::waitMetadataTimerFired):
1039         (WebCore::MediaPlayerPrivate::conditionallyGoFullscreenAfterPlay):
1040         (WebCore):
1041         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1042         (MediaPlayerPrivate):
1043
1044 2012-11-06  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1045
1046         [WK2][EFL][GTK] early return of checkSpellingOfString treats correct words as misspelled
1047         https://bugs.webkit.org/show_bug.cgi?id=101215
1048
1049         Reviewed by Gustavo Noronha Silva.
1050
1051         Save the misspelled location and length of the string to the default values (-1, 0)
1052         at the beginning of the checkSpellingOfString method.
1053         It assumes that the words are spelled correctly and early return of method doesn't
1054         cause assertions in findFirstMisspelling (WebCore/editing/TextCheckingHelper.cpp).
1055
1056         * platform/text/enchant/TextCheckerEnchant.cpp:
1057         (TextCheckerEnchant::checkSpellingOfString):
1058
1059 2012-11-06  Huang Dongsung  <luxtella@company100.net>
1060
1061         [TexMap] Remove unused textures in the texture pool.
1062         https://bugs.webkit.org/show_bug.cgi?id=100706
1063
1064         Reviewed by Noam Rosenthal.
1065
1066         Currently, we do not remove textures in the texture pool of
1067         TextureMapper. The texture pool is destroyed when TextureMapper is
1068         destroyed. It means the texture pool consumes texture memory until its
1069         destruction. This patch removes textures if the textures have been not
1070         used in 3 seconds as LayerTreeCoordinator manages UpdateAtlases.
1071
1072         Changing cache policy is not testable in layout tests.
1073
1074         * platform/graphics/texmap/TextureMapper.cpp:
1075         (WebCore::BitmapTexturePoolEntry::BitmapTexturePoolEntry):
1076         (WebCore::BitmapTexturePoolEntry::markUsed):
1077         (WebCore::BitmapTexturePoolEntry::compareTimeLastUsed):
1078         (BitmapTexturePoolEntry):
1079         (WebCore):
1080         (BitmapTexturePool):
1081         (WebCore::BitmapTexturePool::BitmapTexturePool):
1082         (WebCore::BitmapTexturePool::scheduleReleaseUnusedTextures):
1083         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
1084         (WebCore::BitmapTexturePool::acquireTexture):
1085         (WebCore::TextureMapper::acquireTextureFromPool):
1086         (WebCore::TextureMapper::TextureMapper):
1087         (WebCore::TextureMapper::~TextureMapper):
1088         * platform/graphics/texmap/TextureMapper.h:
1089         (WebCore):
1090         (TextureMapper):
1091
1092 2012-11-02  Ilya Tikhonovsky  <loislo@chromium.org>
1093
1094         Web Inspector: NMI instrument CachedMetadata. It uses ~300k on plus.google.com
1095         https://bugs.webkit.org/show_bug.cgi?id=101067
1096
1097         Reviewed by Yury Semikhatsky.
1098
1099         Plain vanilla instrumentation for CachedMetadata class.
1100
1101         * CMakeLists.txt:
1102         * GNUmakefile.list.am:
1103         * Target.pri:
1104         * WebCore.gypi:
1105         * WebCore.vcproj/WebCore.vcproj:
1106         * WebCore.xcodeproj/project.pbxproj:
1107         * loader/CachedMetadata.cpp: Added.
1108         (WebCore):
1109         (WebCore::CachedMetadata::reportMemoryUsage):
1110         * loader/CachedMetadata.h:
1111         (CachedMetadata):
1112
1113 2012-11-06  Alexei Filippov  <alph@chromium.org>
1114
1115         Web Inspector: report physical memory really committed for JS heap in NMI
1116         https://bugs.webkit.org/show_bug.cgi?id=101335
1117
1118         Some OSes (e.g. Linux) perform lazy commits of requested memory.
1119         Because of that the committed memory may not retain any physical
1120         memory until the very first access to the committed chunk.
1121         That led to JS heap reported more physical memory than was currently
1122         in use.
1123
1124         Reviewed by Vsevolod Vlasov.
1125
1126         * bindings/v8/ScriptGCEvent.cpp:
1127         (WebCore::ScriptGCEvent::getHeapSize):
1128
1129 2012-11-06  Vsevolod Vlasov  <vsevik@chromium.org>
1130
1131         Web Inspector: Breakpoint is not removed when it was set in non-formatted mode and then removed while in formatted mode.
1132         https://bugs.webkit.org/show_bug.cgi?id=100595
1133
1134         Reviewed by Yury Semikhatsky.
1135
1136         Breakpoints in storage are now updated/removed by file name saved from primary location when they were created,
1137         not by the name returned by UISourceCode (as this one could change when UISourceCode is formatted).
1138         SourceFileId is now used across BreakpointManager to specify file name.
1139         And breakpointStorageId is now used to specify (fileName, lineNumber) pair.
1140
1141         * inspector/front-end/BreakpointManager.js:
1142         (WebInspector.BreakpointManager.sourceFileId):
1143         (WebInspector.BreakpointManager.prototype._restoreBreakpoints):
1144         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved): Removed redundant check.
1145         (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
1146         (WebInspector.BreakpointManager.Breakpoint):
1147         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
1148         (WebInspector.BreakpointManager.Storage.prototype._restoreBreakpoints):
1149         (set WebInspector.BreakpointManager.Storage.Item):
1150
1151 2012-11-06  Keishi Hattori  <keishi@webkit.org>
1152
1153         The "Rect" class in WebCore/Resources/pagepopups/pickerCommon.js should be renamed
1154         https://bugs.webkit.org/show_bug.cgi?id=101304
1155
1156         Reviewed by Kent Tamura.
1157
1158         The name Rect conflicts with CSS Rect.
1159
1160         No new tests. Just renaming.
1161
1162         * Resources/pagepopups/pickerCommon.js:
1163         (Rectangle): Renamed from Rect.
1164         (Rectangle.prototype.toString):
1165         (Rectangle.intersection):
1166         (adjustWindowRect):
1167         (hideWindow):
1168
1169 2012-11-06  Kentaro Hara  <haraken@chromium.org>
1170
1171         Replace setDOMWrapper(wrapper, 0) with resetDOMWrapper(wrapper)
1172         https://bugs.webkit.org/show_bug.cgi?id=101190
1173
1174         Reviewed by Adam Barth.
1175
1176         To guarantee that we never stores NULL pointers to V8 internal
1177         fields, we want to insert ASSERT()s to setDOMWrapper().
1178         This patch replaces setDOMWrapper() that intentionally
1179         passes NULL pointers with clearDOMWrapper().
1180
1181         No tests. No change in behavior.
1182
1183         * bindings/v8/V8DOMWrapper.h:
1184         (V8DOMWrapper):
1185         (WebCore::V8DOMWrapper::clearDOMWrapper):
1186         * bindings/v8/V8NPObject.cpp:
1187         (WebCore::forgetV8ObjectForNPObject):
1188
1189 2012-11-06  Vsevolod Vlasov  <vsevik@chromium.org>
1190
1191         Web Inspector: Displayed name/path of urls in network tab of dev tools is inconsistent
1192         https://bugs.webkit.org/show_bug.cgi?id=101064
1193
1194         Reviewed by Yury Semikhatsky.
1195
1196         Extracted some generic methods from ParsedURL displayName getters (about:blank and data url handlers).
1197         Implemented consistent name() and path() method on NetworkRequest based on ParsedURL.
1198         NetworkPanel now uses name() and path() methods on NetworkRequest to show requests and search for them.
1199
1200         Test: http/tests/inspector/network/request-name-path.html
1201
1202         * inspector/front-end/NetworkPanel.js:
1203         (WebInspector.NetworkLogView.prototype._matchRequest):
1204         (WebInspector.NetworkLogView.prototype._highlightMatchedRequests):
1205         (WebInspector.NetworkLogView.prototype.performFilter):
1206         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
1207         (WebInspector.NetworkDataGridNode.NameComparator):
1208         * inspector/front-end/NetworkRequest.js:
1209         (WebInspector.NetworkRequest.prototype.set url):
1210         (WebInspector.NetworkRequest.prototype.name):
1211         (WebInspector.NetworkRequest.prototype.path):
1212         (WebInspector.NetworkRequest.prototype._parseNameAndPathFromURL):
1213         * inspector/front-end/ParsedURL.js:
1214         (WebInspector.ParsedURL):
1215         (WebInspector.ParsedURL.prototype.get displayName):
1216         (WebInspector.ParsedURL.prototype.dataURLDisplayName):
1217         (WebInspector.ParsedURL.prototype.isAboutBlank):
1218         (WebInspector.ParsedURL.prototype.isDataURL):
1219
1220 2012-11-05  Pavel Feldman  <pfeldman@chromium.org>
1221
1222         Web Inspector: make Spectrum and Popover WebInspector.Views in order to enable reuse
1223         https://bugs.webkit.org/show_bug.cgi?id=101200
1224
1225         Reviewed by Yury Semikhatsky.
1226
1227         - Split Spectrum and SpectrumPopoverHelper (first is a component, second is controller)
1228         - Made Popover a root view in order to enable lazy style loading for potential subviews (such as Spectrum)
1229         - Extracted spectrum's css into a separate file
1230
1231         * WebCore.gypi:
1232         * WebCore.vcproj/WebCore.vcproj:
1233         * inspector/front-end/DOMExtension.js:
1234         (Element.prototype.positionAt):
1235         (Size):
1236         (Element.prototype.measurePreferredSize):
1237         * inspector/front-end/HeapSnapshotView.js:
1238         (WebInspector.HeapSnapshotView.prototype.willHide):
1239         (WebInspector.HeapSnapshotView.prototype._helpClicked):
1240         * inspector/front-end/Popover.js:
1241         (WebInspector.Popover):
1242         (WebInspector.Popover.prototype.show):
1243         (WebInspector.Popover.prototype.showView):
1244         (WebInspector.Popover.prototype._innerShow):
1245         (WebInspector.Popover.prototype.hide):
1246         (WebInspector.Popover.prototype.dispose):
1247         (WebInspector.Popover.prototype._positionElement):
1248         * inspector/front-end/Spectrum.js:
1249         (WebInspector.Spectrum.alphaDrag):
1250         (WebInspector.Spectrum):
1251         (WebInspector.Spectrum.prototype.wasShown):
1252         (WebInspector.SpectrumPopupHelper):
1253         (WebInspector.SpectrumPopupHelper.prototype.spectrum):
1254         (WebInspector.SpectrumPopupHelper.prototype.toggle):
1255         (WebInspector.SpectrumPopupHelper.prototype.show):
1256         (WebInspector.SpectrumPopupHelper.prototype.reposition):
1257         (WebInspector.SpectrumPopupHelper.prototype.hide):
1258         (WebInspector.ColorSwatch):
1259         (WebInspector.ColorSwatch.prototype.setColorString):
1260         * inspector/front-end/StylesSidebarPane.js:
1261         (WebInspector.StylesSidebarPane):
1262         (WebInspector.StylesSidebarPane.prototype.update):
1263         (WebInspector.StylesSidebarPane.prototype.willHide):
1264         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
1265         * inspector/front-end/View.js:
1266         (WebInspector.View.prototype.measurePreferredSize):
1267         * inspector/front-end/WebKit.qrc:
1268         * inspector/front-end/elementsPanel.css:
1269         (.image-preview-container img):
1270         * inspector/front-end/inspector.css:
1271         (.swatch):
1272         (.swatch-inner):
1273         (.swatch-inner:hover):
1274         * inspector/front-end/spectrum.css: Added.
1275         (.spectrum-container):
1276         (.spectrum-top):
1277         (.spectrum-color):
1278         (.spectrum-display-value):
1279         (.spectrum-hue):
1280         (.spectrum-fill):
1281         (.spectrum-range-container):
1282         (.spectrum-range-container *):
1283         (.spectrum-range-container label):
1284         (.spectrum-range-container input):
1285         (.spectrum-dragger, .spectrum-slider):
1286         (.spectrum-sat):
1287         (.spectrum-val):
1288         (.spectrum-dragger):
1289         (.spectrum-slider):
1290         (.spectrum-container .swatch):
1291
1292 2012-11-06  Takashi Sakamoto  <tasak@google.com>
1293
1294         removeAttribute('style') not working in certain circumstances
1295         https://bugs.webkit.org/show_bug.cgi?id=99295
1296
1297         Reviewed by Ryosuke Niwa.
1298
1299         After web developers did style.XXXX=YYYY for some element, the inline
1300         style should be always removable by using "removeAttribute('style')".
1301         Currently it depends on whether web developers invokes
1302         getAttribute('style'), setAttribute('style), and so on. E.g. once they
1303         invoke getAttribute('style'), removeAttribute('style') works. This is
1304         very confusing behavior.
1305         Looking at Firefox browser, removeAttribute('style') always removes
1306         all inline styles.
1307
1308         Test: fast/css/remove-attribute-style.html
1309
1310         * css/StylePropertySet.cpp:
1311         (WebCore::StylePropertySet::clear):
1312         Added a new method to remove all style properties.
1313         (WebCore):
1314         * css/StylePropertySet.h:
1315         (StylePropertySet):
1316         * dom/Element.cpp:
1317         (WebCore::Element::removeAttribute):
1318         If 'style' is given but the element has no style attribute, the old
1319         code did nothing. However, if the element is styled element and has any
1320         inline styles, the inline styles should be removed. So invoke
1321         StyledElement::removeAllInlineStyleProperties and if any inline styles
1322         are removed, invoke style recalc, too.
1323         * dom/StyledElement.cpp:
1324         (WebCore::StyledElement::removeAllInlineStyleProperties):
1325         Added a new method to remove all inline style propeties. If any inline
1326         style is removed, invoke inlineStyleChanged() to force style recalc.
1327         (WebCore):
1328         * dom/StyledElement.h:
1329         (StyledElement):
1330
1331 2012-11-06  Alexei Filippov  <alph@chromium.org>
1332
1333         Web Inspector: dim size bar for expanded item in native memory snapshot grid
1334         https://bugs.webkit.org/show_bug.cgi?id=101062
1335
1336         Reviewed by Yury Semikhatsky.
1337
1338         * inspector/front-end/nativeMemoryProfiler.css:
1339         (.native-snapshot-view .data-grid .expanded div.size-bar):
1340
1341 2012-11-06  Shinya Kawanaka  <shinyak@chromium.org>
1342
1343         [Shadow] Using isUnknownPseudoElement() for shadow pseudo id seems confusing
1344         https://bugs.webkit.org/show_bug.cgi?id=100826
1345
1346         Reviewed by Hajime Morita.
1347
1348         We used isUnknownPseudoElement() for these 3 meanings: 1) the element is a custom pseudo-element (starting with 'x-'),
1349         2) the element is a webkit custom pseudo-element (starting with '-webkit-'), and 3) the element has an unknown type.
1350         We would like to distinguish them when parsing CSSSelector types. Also, we disable using (3) type for using
1351         shadowPseudoId.
1352
1353         In this patch, we allow using WebKitCustomPseudoElement in AuthorShadowRoot, and CustomPseudoElement in
1354         UAShadowRoot. However, we will disable them later.
1355
1356         Test: fast/dom/shadow/shadow-pseudo-id.html
1357
1358         * css/CSSGrammar.y.in: Now we can discard UNKNOWN type. It should not match anything.
1359         * css/CSSParser.cpp:
1360         (WebCore::CSSParser::updateSpecifiersWithElementName):
1361         (WebCore::CSSParser::updateSpecifiers):
1362         * css/CSSParserValues.h:
1363         (WebCore::CSSParserSelector::isCustomPseudoElement):
1364         (CSSParserSelector):
1365         * css/CSSSelector.cpp:
1366         (WebCore::CSSSelector::pseudoId):
1367         (WebCore::CSSSelector::parsePseudoType):
1368         (WebCore::CSSSelector::isCustomPseudoType): Returns true if the type is PseudoUserAgentCustomElement or PseudoWebKitCustomElement.
1369         (WebCore::CSSSelector::extractPseudoType):
1370         * css/CSSSelector.h:
1371         (CSSSelector):
1372         (WebCore::CSSSelector::isCustomPseudoElement):
1373         (WebCore):
1374         * css/CSSSelectorList.cpp:
1375         (WebCore::SelectorHasInvalidSelectorFunctor::operator()): We will reject all selectors which were judged as
1376         UNKNOWN before. i.e. It contians all three types for now.
1377         (WebCore::CSSSelectorList::hasInvalidSelector): Renamed.
1378         * css/CSSSelectorList.h:
1379         (CSSSelectorList):
1380         * css/RuleSet.cpp:
1381         (WebCore::RuleSet::addRule):
1382         * css/SelectorChecker.cpp:
1383         (WebCore::SelectorChecker::checkSelector):
1384         * dom/Element.cpp:
1385         (WebCore::Element::setShadowPseudoId):
1386         * dom/SelectorQuery.cpp:
1387         (WebCore::SelectorQueryCache::add):
1388
1389 2012-11-06  Shinya Kawanaka  <shinyak@chromium.org>
1390
1391         [Shadow] ShadowRoot should know the existence of elements having ElementShadow.
1392         https://bugs.webkit.org/show_bug.cgi?id=100922
1393
1394         Reviewed by Hajime Morita.
1395
1396         We count the elements having ElementShadow in ShadowRoot. This is a prepation patch for to solve Bug 100451.
1397         We have a count-up and count-down login in ShadowRoot::insertedInto and ShadowRoot::removedFrom.
1398
1399         For performance reason, we have a flag that an element should be unregistered in ShadowRoot.
1400
1401         Test: fast/dom/shadow/has-elementshadow.html
1402
1403         * dom/ShadowRoot.cpp:
1404         (WebCore::ShadowRoot::ShadowRoot):
1405         (WebCore::ShadowRoot::insertedInto): Count up the number of elements having ElementShadow. ElementShadow
1406         is created only when the oldest ShadowRoot is created, we only count up only when this ShadowRoot is oldest.
1407         (WebCore):
1408         (WebCore::ShadowRoot::removedFrom): Count down if we used this ShadowRoot for count up.
1409         * dom/ShadowRoot.h:
1410         (ShadowRoot):
1411         (WebCore::ShadowRoot::registerElementShadow):
1412         (WebCore::ShadowRoot::unregisterElementShadow):
1413         (WebCore::ShadowRoot::hasElementShadow):
1414         (WebCore::ShadowRoot::countElementShadow):
1415         * testing/Internals.cpp:
1416         (WebCore::Internals::countElementShadow):
1417         (WebCore):
1418         * testing/Internals.h:
1419         (Internals):
1420         * testing/Internals.idl:
1421
1422 2012-11-06  Pavel Feldman  <pfeldman@chromium.org>
1423
1424         Web Inspector: show "debugging session terminated" message when remote debuggign connection is closed unexpectedly.
1425         https://bugs.webkit.org/show_bug.cgi?id=101030
1426
1427         Reviewed by Vsevolod Vlasov.
1428
1429         * inspector/front-end/inspector.js:
1430         (WebInspector.loaded.WebInspector.socket.onclose):
1431         (WebInspector.loaded):
1432         (WebInspector.detached):
1433
1434 2012-11-06  Alexander Pavlov  <apavlov@chromium.org>
1435
1436         Web Inspector: [Overrides] Add Chrome for Android and Firefox for Android user agent strings
1437         https://bugs.webkit.org/show_bug.cgi?id=100666
1438
1439         Reviewed by Pavel Feldman.
1440
1441         * inspector/front-end/SettingsScreen.js:
1442         (WebInspector.UserAgentSettingsTab.prototype._createUserAgentSelectRowElement.get const):
1443
1444 2012-11-02  Yury Semikhatsky  <yurys@chromium.org>
1445
1446         Web Inspector: JavaScript web workers debugging crashes
1447         https://bugs.webkit.org/show_bug.cgi?id=101065
1448
1449         Reviewed by Alexander Pavlov.
1450
1451         Clear m_pageInspector when page inspector instance is deleted.
1452         Disable worker inspection when front-end disconnects.
1453
1454         Test: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
1455
1456         * inspector/InspectorWorkerAgent.cpp:
1457         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel): notify
1458         WorkerMessagingProxy so that it can clear pointer to the channel.
1459
1460 2012-11-06  Nikita Vasilyev  <me@elv1s.ru>
1461
1462         Web Inspector: Console: wrap long URLs
1463         https://bugs.webkit.org/show_bug.cgi?id=100970
1464
1465         Reviewed by Yury Semikhatsky.
1466
1467         * inspector/front-end/inspector.css:
1468         (.console-message-url):
1469
1470 2012-11-05  Keishi Hattori  <keishi@webkit.org>
1471
1472         Introduce Day class to calendar picker
1473         https://bugs.webkit.org/show_bug.cgi?id=101194
1474
1475         Reviewed by Kent Tamura.
1476
1477         Introducing Day class so day, week, and month can all be abstracted. To
1478         solve some of the complexity around which months to show, I made
1479         CalendarPicker in charge of it. This also made YearMonthController and
1480         DaysTable independent of each other.
1481
1482         No new tests. Covered by existing calendar-picker-*.html tests.
1483
1484         * Resources/pagepopups/calendarPicker.js:
1485         (createUTCDate): Allow negative month or date.
1486         (parseDateString): Will return Day or Month depending on string format.
1487         (Day): Represents a day.
1488         (Day.parse): Parse yyyy-mm-dd.
1489         (Day.createFromDate): Creates a Day that contains a datetime.
1490         (Day.createFromToday): Creates Day for today. A method with the same name will be added to Week and Month in the future.
1491         (Day.prototype.equals): Returns true if they are the same.
1492         (Day.prototype.previous): Returns the previous day.
1493         (Day.prototype.next): Returns the next day.
1494         (Day.prototype.startDate): Returns the datetime that is the start of this day.
1495         (Day.prototype.endDate): Returns the datetime that is the start of this day.
1496         (Day.prototype.valueOf): Returns the milliseconds since epoch.
1497         (Day.prototype.toString): Returns an ISO date string.
1498         (Month): Fix bug in calculating month from value.
1499         (Month.prototype.endDate): Use Day.Maximum.
1500         (CalendarPicker): Added _currentMonth. yearMonthController and daysTable can be private members now.
1501         (CalendarPicker.prototype._layout):
1502         (CalendarPicker.prototype.handleToday): Use Day.createFromToday.
1503         (CalendarPicker.prototype.shouldShowMonth): Returns true if the month should be shown.
1504         (CalendarPicker.prototype.showMonth): Shows the given month. If the month is out of the range of months that should be shown, we clamp the month and show that.
1505         (CalendarPicker.prototype.currentMonth): Returns the current month that is shown.
1506         (YearMonthController): Removed _currentMonth.
1507         (YearMonthController.prototype.attachTo):
1508         (YearMonthController.prototype.setMonth):
1509         (YearMonthController.prototype._handleYearMonthChange): Use CalendarPicker.showMonth
1510         (YearMonthController.prototype.moveRelatively):
1511         (DaysTable):
1512         (CalendarPicker.prototype._stepMismatch): Made private.
1513         (CalendarPicker.prototype._outOfRange): Made private.
1514         (CalendarPicker.prototype.isValidDate): Take Day or Month instead of milliseconds since epoch.
1515         (DaysTable.prototype._renderMonth):
1516         (DaysTable.prototype.navigateToMonth): Shows a given month. Can use animation and leave the selection position as is.
1517         (DaysTable.prototype.selectRange): Select a range.
1518         (DaysTable.prototype._maybeSetPreviousMonth):
1519         (DaysTable.prototype._maybeSetNextMonth):
1520         (DaysTable.prototype._handleKey):
1521         (CalendarPicker.prototype._handleBodyKeyDown):
1522
1523 2012-11-05  Kenichi Ishibashi  <bashi@chromium.org>
1524
1525         Unreviewed, Adding #if PLATFORM(CHROMIUM) for the fix of
1526         https://bugs.webkit.org/show_bug.cgi?id=101009
1527
1528         This fix requires the most recent version of harfbuzz-ng.
1529         EFL port uses version 0.9.2, which doesn't have the fix.
1530
1531         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1532         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
1533
1534 2012-11-05  Glenn Adams  <glenn@skynav.com>
1535
1536         Ensure acquireLineBreakIterator signature consistency on non-ICU ports.
1537         https://bugs.webkit.org/show_bug.cgi?id=101281
1538
1539         Reviewed by Ryosuke Niwa.
1540
1541         Fix (newly) inconsistent signature for acquireLineBreakIterator for non-ICU ports
1542         caused by http://trac.webkit.org/changeset/133529.
1543
1544         See new tests added from https://bugs.webkit.org/show_bug.cgi?id=89235.
1545
1546         * platform/text/TextBreakIterator.cpp:
1547         (WebCore::acquireLineBreakIterator):
1548         * platform/text/gtk/TextBreakIteratorGtk.cpp:
1549         (WebCore::setUpIterator):
1550         (WebCore::acquireLineBreakIterator):
1551         * platform/text/wince/TextBreakIteratorWinCE.cpp:
1552         (WebCore::acquireLineBreakIterator):
1553
1554 2012-11-05  Hayato Ito  <hayato@chromium.org>
1555
1556         Use switch/case statements instead of if/elseif in CSSSelector.cpp
1557         https://bugs.webkit.org/show_bug.cgi?id=100470
1558
1559         Reviewed by Ryosuke Niwa.
1560
1561         Minor clean up. We can get compiler warnings if we use switch/case statements here.
1562
1563         No changes to functionality, so no new tests.
1564
1565         * css/CSSSelector.cpp:
1566         (WebCore::CSSSelector::selectorText):
1567
1568 2012-11-05  Kenichi Ishibashi  <bashi@chromium.org>
1569
1570         [Chromium] Unicode combining diacritical aren't always combined on Linux
1571         https://bugs.webkit.org/show_bug.cgi?id=101009
1572
1573         Reviewed by Kent Tamura.
1574
1575         Add a space character to harfbuzzBuffer as pre-context. This will prevent
1576         harfbuzz from inserting dotted-circle.
1577
1578         Test: fast/text/international/combining-marks-position.html
1579
1580         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1581         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
1582
1583 2012-11-05  Shinya Kawanaka  <shinyak@chromium.org>
1584
1585         LayoutTest fast/dom/shadow/shadowroot-type.html is failing on Windows
1586         https://bugs.webkit.org/show_bug.cgi?id=101201
1587
1588         Reviewed by Hajime Morita.
1589
1590         When we use a bit field for enum, Windows compiler seems returning some wrong value.
1591         We would like to avoid using a bit field for enum value.
1592
1593         * dom/ShadowRoot.cpp:
1594         (WebCore::ShadowRoot::create):
1595         * dom/ShadowRoot.h:
1596         (WebCore::ShadowRoot::type):
1597         (WebCore::ShadowRoot::setType):
1598         (ShadowRoot):
1599
1600 2012-11-05  Benjamin Poulain  <benjamin@webkit.org>
1601
1602         TransformOperationInfo's constructor is really slow
1603         https://bugs.webkit.org/show_bug.cgi?id=101143
1604
1605         Reviewed by Sam Weinig.
1606
1607         TransformOperationInfo() was slow for a few reasons:
1608         -The function used a lot of branches. The basic assumption is that the input
1609          is incorrect, thus every character is an opportunity to fail.
1610         -Every branch had to be tested in order. If the name was matching the last if()
1611          all the previous names had to be tested.
1612         -Since equalIgnoringCase() was used in every branch, it was forcing the case folding
1613          every time.
1614         -When the string is 16bits, the case folding was using ICU, which was incredibly inefficient.
1615
1616         This can be fixed by either
1617         1) Compute the lowercase name, then match it to a HashMap.
1618         2) Write a tree to quickly reduce the number of branch needed.
1619
1620         The first solution is not viable because 16bits strings case folding
1621         remains an important bottleneck.
1622
1623         Instead, the code now splits the names on simple characteristics to
1624         match any name in a limited number of branches.
1625
1626         The assumption is the input is correct, so & is used instead of && to
1627         avoid branches in favor of conditional instructions.
1628
1629         * css/CSSParser.cpp:
1630         (WebCore::TransformOperationInfo::TransformOperationInfo):
1631
1632 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
1633
1634         RenderGeometryMap asserts when loading http://en.softonic.com/mac
1635         https://bugs.webkit.org/show_bug.cgi?id=101284
1636         <rdar://problem/11540560>
1637
1638         Reviewed by Tim Horton.
1639
1640         When FrameView::layout() calls document->updateStyleIfNeeded(), we
1641         can be in a state where FrameView::needsLayout() is false. However,
1642         this is a bad time to update compositing layers, because we're about
1643         to do layout, which will require us to update them again soon anyway,
1644         and some RenderLayers may not have been sized or positioned yet.
1645         
1646         Fix by adding a m_doingPreLayoutStyleUpdate member to FrameView,
1647         and toggling it around this call to updateStyleIfNeeded().
1648         Read this state in updateCompositingLayersAfterStyleChange(), which is
1649         now called unconditionally by recalcStyle(), but returns early
1650         if this flag is set, or layout is pending.
1651
1652         * dom/Document.cpp:
1653         (WebCore::Document::recalcStyle):
1654         * page/FrameView.cpp:
1655         (WebCore::FrameView::reset):
1656         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
1657         (WebCore::FrameView::layout):
1658         * page/FrameView.h:
1659         (FrameView):
1660
1661 2012-11-05  Beth Dakin  <bdakin@apple.com>
1662
1663         https://bugs.webkit.org/show_bug.cgi?id=101275
1664         Clean up ScrollingConstraints.h
1665
1666         Reviewed by Simon Fraser.
1667
1668         This class cleans up ScrollingConstraints.h by removing the constructors since the 
1669         compiler will generate those constructors for us anyway. The patch also makes the 
1670         two override functions private.
1671         * page/scrolling/ScrollingConstraints.h:
1672         (ViewportConstraints):
1673         (FixedPositionViewportConstraints):
1674         (StickyPositionViewportConstraints):
1675
1676 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
1677
1678         Make Document::updateStyleIfNeeded() non-virtual
1679         https://bugs.webkit.org/show_bug.cgi?id=101273
1680
1681         Reviewed by Eric Seidel.
1682
1683         Document::updateStyleIfNeeded() has been virtual like forever, but
1684         no-one ever overrides it, so make it non-virtual.
1685
1686         * dom/Document.h:
1687         (Document):
1688
1689 2012-11-05  Philip Rogers  <pdr@google.com>
1690
1691         Unblock SVG external references
1692         https://bugs.webkit.org/show_bug.cgi?id=100635
1693
1694         Reviewed by Adam Barth.
1695
1696         This patch reverts r132849 and r132869 because the potential XSS issue
1697         turned out to not be an issue after all.
1698
1699         Covered by existing tests, many of which are re-whitelisted with this patch.
1700
1701         * loader/cache/CachedResourceLoader.cpp:
1702         (WebCore::CachedResourceLoader::canRequest):
1703
1704 2012-11-05  Beth Dakin  <bdakin@apple.com>
1705
1706         https://bugs.webkit.org/show_bug.cgi?id=101001
1707         Pages with position:fixed elements should still be able to scroll on 
1708         the scrolling thread
1709         -and corresponding-
1710         <rdar://problem/10857315>
1711
1712         Reviewed by Simon Fraser.
1713
1714         This patch adds two new classes. ScrollingStateFixedNode is a class 
1715         to represent fixed nodes in the state tree, and 
1716         ScrollingTreeFixedNode represents fixed node in the scrolling tree 
1717         over on the scrolling thread.
1718         * WebCore.xcodeproj/project.pbxproj:
1719
1720         When we are (non-programatically) scrolling fixed objects on the 
1721         scrolling thread, we do not want to do any work here. 
1722         * page/FrameView.cpp:
1723         (WebCore::FrameView::updateFixedElementsAfterScrolling):
1724
1725         Whenever we sync the position of the main frame's layer, we have to 
1726         do the same for scrolling tree children.
1727         * page/scrolling/ScrollingCoordinator.cpp:
1728         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
1729
1730         New ScrollingNodeType -- FixedNode, yay! And two new functions 
1731         specific to dealing with FixedNodes.
1732         * page/scrolling/ScrollingCoordinator.h:
1733         (WebCore::ScrollingCoordinator::updateViewportConstrainedNode):
1734         (WebCore::ScrollingCoordinator::syncChildPositions):
1735
1736         This is the new class that represents fixed nodes in the state tree. 
1737         All of the changed properties are stored within 
1738         FixedPositionViewportConstraints.
1739         * page/scrolling/ScrollingStateFixedNode.cpp: Added.
1740         (WebCore):
1741         (WebCore::ScrollingStateFixedNode::create):
1742         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
1743         (WebCore::ScrollingStateFixedNode::~ScrollingStateFixedNode):
1744         (WebCore::ScrollingStateFixedNode::updateConstraints):
1745         (WebCore::ScrollingStateFixedNode::dumpProperties):
1746         * page/scrolling/ScrollingStateFixedNode.h: Added.
1747         (WebCore):
1748         (ScrollingStateFixedNode):
1749         (WebCore::ScrollingStateFixedNode::viewportConstraints):
1750         (WebCore::toScrollingStateFixedNode):
1751
1752         Make sure to create the right type of clone for each node.
1753         * page/scrolling/ScrollingStateNode.cpp:
1754         (WebCore::ScrollingStateNode::cloneAndReset):
1755
1756         Now that m_children may be anything other than null, I found this 
1757         bug. We encounter it when the parameter to removeChild is this and we 
1758         want to remove all of our children. In that case, this is obviously 
1759         not found in its own child array.
1760         (WebCore::ScrollingStateNode::removeChild):
1761
1762         ScrollingStateNode now caches the GraphicsLayer in addition to the 
1763         PlatformLayer. This will allow us to sync the GraphicsLayer position 
1764         at the appropriate times.
1765         * page/scrolling/ScrollingStateNode.h:
1766         (WebCore::ScrollingStateNode::isScrollingStateFixedNode):
1767         (WebCore::ScrollingStateNode::graphicsLayer):
1768         (ScrollingStateNode):
1769
1770         Handle fixed nodes.
1771         * page/scrolling/ScrollingTree.cpp:
1772         (WebCore::ScrollingTree::updateTreeFromStateNode):
1773
1774         New function parentScrollPositionDidChange() is called on children 
1775         when the parent has scrolled.
1776         * page/scrolling/ScrollingTreeNode.h:
1777         (ScrollingTreeNode):
1778         * page/scrolling/ScrollingTreeScrollingNode.h:
1779         (ScrollingTreeScrollingNode):
1780
1781         Return true for supportsFixedPositionLayers(). 
1782         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1783         (ScrollingCoordinatorMac):
1784
1785         Handle fixed nodes.
1786         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1787         (WebCore::ScrollingCoordinatorMac::attachToStateTree):
1788
1789         Now that m_children can be non-null I caught this pre-existing bug 
1790         where we would come times remove a node without updating the HashMap. 
1791         This patch fixes that by consolidating the removal into one function.
1792         (WebCore::ScrollingCoordinatorMac::removeNode):
1793         (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
1794         (WebCore::ScrollingCoordinatorMac::clearStateTree):
1795
1796         Update the GraphicsLayers to reflect the new position that the 
1797         Scrolling thread has moved the underlying CALayer to already.
1798         (WebCore::ScrollingCoordinatorMac::syncChildPositions):
1799
1800         Pass new constraints over to the appropriate state node.
1801         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
1802
1803         Cache the GraphicsLayer in addition to the PlatformLayer.
1804         * page/scrolling/mac/ScrollingStateNodeMac.mm:
1805         (WebCore::ScrollingStateNode::setScrollLayer):
1806
1807         Here is the new class that represents fixed nodes over on the 
1808         scrolling thread. 
1809         * page/scrolling/mac/ScrollingTreeFixedNode.h: Added.
1810         (WebCore):
1811         (ScrollingTreeFixedNode):
1812         * page/scrolling/mac/ScrollingTreeFixedNode.mm: Added.
1813         (WebCore):
1814         (WebCore::ScrollingTreeFixedNode::create):
1815         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
1816         (WebCore::ScrollingTreeFixedNode::~ScrollingTreeFixedNode):
1817         (WebCore::ScrollingTreeFixedNode::update):
1818
1819         This is where the magic happens. re-position the fixed object when 
1820         its parent has scrolled so that it appears to have not moved at all.
1821         (WebCore::ScrollingTreeFixedNode::parentScrollPositionDidChange):
1822
1823         Whenever we change the position of a scrolling layer, tell our 
1824         children.
1825         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1826         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1827
1828         Handle fixed nodes.
1829         * rendering/RenderLayerBacking.cpp:
1830         (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
1831
1832         detachFromScrollingCoordinator() needs to be public so that it can be 
1833         called from RenderLayerCompositor for fixed nodes.
1834         * rendering/RenderLayerBacking.h:
1835         (RenderLayerBacking):
1836
1837         RenderLayerCompositor takes control of attaching and detaching fixed 
1838         nodes to/from the ScrollingCoordinator. 
1839         * rendering/RenderLayerCompositor.cpp:
1840         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1841         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
1842         (WebCore::RenderLayerCompositor::updateBacking):
1843         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1844         (WebCore::RenderLayerCompositor::didMoveOnscreen):
1845         (WebCore::RenderLayerCompositor::willMoveOffscreen):
1846         (WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants):
1847         (WebCore::isRootmostFixedOrStickyLayer):
1848         (WebCore):
1849         (WebCore::RenderLayerCompositor::updateViewportConstraintStatus):
1850         (WebCore::RenderLayerCompositor::addViewportConstrainedLayer):
1851         (WebCore::RenderLayerCompositor::removeViewportConstrainedLayer):
1852         (WebCore::RenderLayerCompositor::computeViewportConstraints):
1853         (WebCore::nearestScrollingCoordinatorAncestor):
1854         (WebCore::RenderLayerCompositor::registerOrUpdateViewportConstrainedLayer):
1855         (WebCore::RenderLayerCompositor::unregisterViewportConstrainedLayer):
1856         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1857         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
1858         * rendering/RenderLayerCompositor.h:
1859         (WebCore):
1860         (RenderLayerCompositor):
1861
1862 2012-11-05  Geoffrey Garen  <ggaren@apple.com>
1863
1864         Cleaned up the Font class in preparation for optimizing kerning and ligatures
1865         https://bugs.webkit.org/show_bug.cgi?id=101258
1866
1867         Reviewed by Dan Bernstein.
1868
1869         * platform/graphics/Font.h:
1870         (WebCore::Font::typesettingFeatures):
1871         (WebCore::Font::computeTypesettingFeatures): Compute and cache our
1872         typesetting features instead of recomputing each time a client asks
1873         for them. This makes the class interface easier to use because
1874         "typesettingFeatures()" can appear in more than one expression without
1875         undue performance cost. This may also be a small speedup to code that
1876         calls typesettingFeatures() often for other reasons.
1877
1878         * platform/graphics/Font.cpp:
1879         (WebCore::Font::Font):
1880         (WebCore::Font::operator=):
1881         (WebCore::Font::update): Ditto.
1882
1883         (WebCore::Font::width): Unforked the width() function so all width-related
1884         interfaces can benefit from optimization without duplicate code.
1885
1886 2012-11-05  Peng Huang  <penghuang@google.com>
1887
1888         Webkit does not handle some media keys correctly On Linux gtk platform.
1889         https://bugs.webkit.org/show_bug.cgi?id=101221
1890
1891         Reviewed by Alexey Proskuryakov.
1892
1893         Add media keyboard support on Linux gtk platform.
1894
1895         * platform/chromium/KeyCodeConversionGtk.cpp:
1896         (WebCore::windowsKeyCodeForKeyEvent):
1897
1898 2012-11-05  Glenn Adams  <glenn@skynav.com>
1899
1900         Add support to -webkit-line-break property for CSS3 Text line-break property values and semantics.
1901         https://bugs.webkit.org/show_bug.cgi?id=89235
1902
1903         Reviewed by Eric Seidel.
1904
1905         See also wiki documentation at:
1906         [1] http://trac.webkit.org/wiki/LineBreaking
1907         [2] http://trac.webkit.org/wiki/LineBreakingCSS3Mapping
1908
1909         Web exposed changes include:
1910         (1) The default (initial) value for -webkit-line-break becomes 'auto', instead of 'normal';
1911         (2) The values 'auto', 'loose', 'normal', and 'strict' are added to -webkit-line-break;
1912         (3) See [2] above for details regarding interpretation.
1913
1914         Tests: css3/line-break/line-break-auto-centered.html
1915                css3/line-break/line-break-auto-half-kana.html
1916                css3/line-break/line-break-auto-hyphens.html
1917                css3/line-break/line-break-auto-inseparables.html
1918                css3/line-break/line-break-auto-iteration-marks.html
1919                css3/line-break/line-break-auto-postfixes.html
1920                css3/line-break/line-break-auto-prefixes.html
1921                css3/line-break/line-break-auto-sound-marks.html
1922                css3/line-break/line-break-loose-centered.html
1923                css3/line-break/line-break-loose-half-kana.html
1924                css3/line-break/line-break-loose-hyphens.html
1925                css3/line-break/line-break-loose-inseparables.html
1926                css3/line-break/line-break-loose-iteration-marks.html
1927                css3/line-break/line-break-loose-postfixes.html
1928                css3/line-break/line-break-loose-prefixes.html
1929                css3/line-break/line-break-loose-sound-marks.html
1930                css3/line-break/line-break-normal-centered.html
1931                css3/line-break/line-break-normal-half-kana.html
1932                css3/line-break/line-break-normal-hyphens.html
1933                css3/line-break/line-break-normal-inseparables.html
1934                css3/line-break/line-break-normal-iteration-marks.html
1935                css3/line-break/line-break-normal-postfixes.html
1936                css3/line-break/line-break-normal-prefixes.html
1937                css3/line-break/line-break-normal-sound-marks.html
1938                css3/line-break/line-break-strict-centered.html
1939                css3/line-break/line-break-strict-half-kana.html
1940                css3/line-break/line-break-strict-hyphens.html
1941                css3/line-break/line-break-strict-inseparables.html
1942                css3/line-break/line-break-strict-iteration-marks.html
1943                css3/line-break/line-break-strict-postfixes.html
1944                css3/line-break/line-break-strict-prefixes.html
1945                css3/line-break/line-break-strict-sound-marks.html
1946
1947         * platform/text/LineBreakIteratorPoolICU.h:
1948         (WebCore::LineBreakIteratorPool::makeLocaleWithBreakKeyword):
1949         Add static function to construct ICU locale argument (also used as pool key) with additional
1950         break keyword.
1951         (WebCore::LineBreakIteratorPool::take):
1952         (WebCore::LineBreakIteratorPool::put):
1953         (LineBreakIteratorPool):
1954         Remove direct dependency from ICU library (and types), moving that dependency into
1955         new {open,close}LineBreakIterator() functions (defined in TextBreakIteratorICU.cpp).
1956         Update to take line break mode into account.
1957         Create (and cache) different break iterators depending on line break mode (in addition to locale),
1958         which entails expanding pool entry key format to optionally append "@break=" +
1959         "loose"|"normal"|"strict" keyword to locale string.
1960
1961         * platform/text/TextBreakIterator.h:
1962         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
1963         (WebCore::LazyLineBreakIterator::isLooseCJKMode):
1964         (WebCore::LazyLineBreakIterator::get):
1965         (WebCore::LazyLineBreakIterator::reset):
1966         (LazyLineBreakIterator):
1967         Define LineBreakIteratorMode enumeration for use in TextBreakIterator et al.
1968         Add state member to indicate line break mode.
1969
1970         * platform/text/TextBreakIteratorICU.cpp:
1971         (WebCore::acquireLineBreakIterator):
1972         Use new line break mode when making iterator from pool.
1973         Handle change of return type of LineBreakIteratorPool::take() to non-ICU type,
1974         i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
1975         (WebCore::releaseLineBreakIterator):
1976         Handle change of parameter type of LineBreakIteratorPool::put() to non-ICU type,
1977         i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
1978         (WebCore::isCJKLocale):
1979         New functions for determining if CJK rules apply.
1980         (WebCore::openLineBreakIterator):
1981         New function for abstracting opening of ICU style line break iterator. This is now
1982         used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
1983         This function also takes into account the line break mode.
1984         (WebCore::closeLineBreakIterator):
1985         (WebCore::mapLineIteratorModeToRules):
1986         New function for abstracting closing of ICU style line break iterator. This is now
1987         used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
1988
1989         * rendering/RenderBlockLineLayout.cpp:
1990         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
1991         Pass line break iterator mode flag when reseting LazyLineBreakIterator.
1992         Add looseMode local variable to prevent need for computing under isBreakable().
1993
1994         * rendering/RenderText.cpp:
1995         (WebCore::mapLineBreakToIteratorMode):
1996         Add implementation for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
1997         and RenderBlock::LineBreaker::nextLineBreak.
1998         (WebCore::RenderText::computePreferredLogicalWidths):
1999         Ensure (lazy line) breakIterator is initialized for line break mode.
2000         Ensure isBreakable() is passed loose mode flag to match behavior in RenderBlock::LineBreaker::nextLineBreak.
2001
2002         * rendering/RenderText.h:
2003         (WebCore):
2004         Add declaration for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
2005         and RenderBlock::LineBreaker::nextLineBreak.
2006
2007         * rendering/break_lines.cpp:
2008         (WebCore):
2009         Introduce two (local) enums NBSPBehavior and LooseBehavior for expanding template on nextBreakablePosition
2010         to include loose mode parameter.
2011         (WebCore::isBreakableSpace):
2012         Add externally specified loose mode parameter to prevent need to invoke line break iterator
2013         accessor method on each invocation. Use new loose mode flavors off NBP functions.
2014         (WebCore::needsLineBreakIterator):
2015         Introduce loose mode behavior template parameter to optimize loose mode behavior code path in order
2016         to prevent regression to non loose mode path.
2017         (WebCore::nextBreakablePosition):
2018         (WebCore::nextBreakablePositionIgnoringNBSP):
2019         Use new template parameter enums described above.
2020         (WebCore::nextBreakablePositionIgnoringNBSPLoose):
2021         (WebCore::nextBreakablePositionLoose):
2022         Introduce two additional 'loose' mode flavors of NBP template expansions.
2023
2024         * rendering/break_lines.h:
2025         (WebCore):
2026         (WebCore::isBreakable):
2027         Add externally specified loose mode parameter to prevent need to invoke line break iterator
2028         accessor method on each invocation.
2029
2030 2012-11-05  Adam Barth  <abarth@webkit.org>
2031
2032         webkitRegionLayoutUpdate is incorrectly named
2033         https://bugs.webkit.org/show_bug.cgi?id=100335
2034
2035         Reviewed by Ojan Vafai.
2036
2037         DOM event names are supposed to be lower case.
2038
2039         * dom/EventNames.h:
2040         (WebCore):
2041         * dom/WebKitNamedFlow.cpp:
2042         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
2043
2044 2012-11-05  Adam Barth  <abarth@webkit.org>
2045
2046         [V8] IntrusiveDOMWrapperMap should be usable for more than just Nodes
2047         https://bugs.webkit.org/show_bug.cgi?id=101110
2048
2049         Reviewed by Kentaro Hara.
2050
2051         This patch generalizes our support for storing wrappers in DOM objects
2052         to be usable for more than just nodes. After this patch, any object
2053         with a ScriptWrappable base class will have its wrapper stored inline
2054         in the object in the main world.
2055
2056         To achieve this goal, this patch hides the details of how we map from
2057         objects to wrappers inside DOMDataStore and then removes the
2058         IntrusiveDOMWrapperMap class entirely. This approach lets us remove the
2059         DOMWrapperMap base class and make all of these functions non-virtual.
2060
2061         * UseV8.cmake:
2062         * WebCore.gypi:
2063             - Remove deleted files.
2064         * bindings/scripts/CodeGeneratorV8.pm:
2065         (GenerateHeader):
2066         (GenerateNormalAttrGetter):
2067         (GenerateConstructorCallback):
2068         (GenerateNamedConstructorCallback):
2069         (GenerateToV8Converters):
2070             - Rather than grabbing at the DOMWrapperMap directly, we now ask
2071               the DOMDataStore to do this work for us.
2072         * bindings/scripts/test/V8/V8Float64Array.h:
2073         (WebCore::V8Float64Array::wrap):
2074         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2075         (WebCore::V8TestActiveDOMObject::wrap):
2076         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2077         (WebCore::V8TestCustomNamedGetter::wrap):
2078         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2079         (WebCore::V8TestEventConstructor::wrap):
2080         * bindings/scripts/test/V8/V8TestEventTarget.h:
2081         (WebCore::V8TestEventTarget::wrap):
2082         * bindings/scripts/test/V8/V8TestException.h:
2083         (WebCore::V8TestException::wrap):
2084         * bindings/scripts/test/V8/V8TestInterface.h:
2085         (WebCore::V8TestInterface::wrap):
2086         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2087         (WebCore::V8TestMediaQueryListListener::wrap):
2088         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2089         (WebCore::V8TestNamedConstructor::wrap):
2090         * bindings/scripts/test/V8/V8TestNode.cpp:
2091         (WebCore::V8TestNode::constructorCallback):
2092         (WebCore::V8TestNode::wrapSlow):
2093         * bindings/scripts/test/V8/V8TestObj.cpp:
2094         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
2095         * bindings/scripts/test/V8/V8TestObj.h:
2096         (WebCore::V8TestObj::wrap):
2097         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2098         (WebCore::V8TestSerializedScriptValueInterface::wrap):
2099         * bindings/v8/DOMDataStore.cpp:
2100             - Updated run-bindings-test results.
2101         (WebCore::DOMDataStore::DOMDataStore):
2102         (WebCore::DOMDataStore::~DOMDataStore):
2103             - Simplify constructor and destructor now that there is only one
2104               hash map.
2105         (WebCore::DOMDataStore::current):
2106             - Now that V8DOMMap.cpp doesn't handle the null isolate case, we
2107               need to handle it here.
2108         (WebCore::DOMDataStore::reportMemoryUsage):
2109             - Simplfied now that there is only one wrapper map.
2110         (WebCore::DOMDataStore::weakCallback):
2111             - Moved from IntrusiveDOMWrapperMap.h
2112         * bindings/v8/DOMDataStore.h:
2113         (WebCore::DOMDataStore::get):
2114         (WebCore::DOMDataStore::set):
2115             - These functions now handle the intrusive case with a branch
2116               rather than with a virtual function call. In many cases, the
2117               branch can be optimized away by the compiler when the overloaded
2118               inline functions are inlined.
2119         (WebCore::DOMDataStore::wrapperIsStoredInObject):
2120             - Overloaded functions to determine whether to store the wrapper
2121               inside the object or in the hashmap.
2122         (WebCore::DOMDataStore::getWrapperFromObject):
2123         (WebCore::DOMDataStore::storeWrapperInObject):
2124             - Overloaded functions to get/set the wrapper from inside the
2125               object itself.
2126         * bindings/v8/DOMWrapperMap.h:
2127         (WebCore::DOMWrapperHashMap::get):
2128         (WebCore::DOMWrapperHashMap::set):
2129         (WebCore::DOMWrapperHashMap::clear):
2130         (WebCore::DOMWrapperHashMap::reportMemoryUsage):
2131         (WebCore::DOMWrapperHashMap::remove):
2132             - These functions are no longer virtual.
2133         * bindings/v8/DOMWrapperWorld.h:
2134         * bindings/v8/IntrusiveDOMWrapperMap.h: Removed.
2135         * bindings/v8/ScriptProfiler.cpp:
2136         * bindings/v8/SerializedScriptValue.cpp:
2137         (WebCore::neuterBinding):
2138             - We need to keep the type information slightly longer so that we
2139               look in the right wrapper map.
2140         * bindings/v8/V8DOMMap.cpp: Removed.
2141         * bindings/v8/V8DOMMap.h: Removed.
2142         * bindings/v8/V8DOMWindowShell.cpp:
2143         * bindings/v8/V8DOMWrapper.cpp:
2144         * bindings/v8/V8DOMWrapper.h:
2145         (WebCore::V8DOMWrapper::getCachedWrapper):
2146             - Defer this work to the store.
2147         (WebCore::V8DOMWrapper::setWrapperClass):
2148             - An overloaded function to set the right wrapper class.
2149         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
2150             - This function is now general enough to handle ever kind of object.
2151         * bindings/v8/V8GCController.cpp:
2152         * bindings/v8/V8NPObject.cpp:
2153         * bindings/v8/WorkerContextExecutionProxy.cpp:
2154         * bindings/v8/WorkerScriptController.cpp:
2155         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2156         (WebCore::v8HTMLImageElementConstructorCallback):
2157             - Call the more general function (instead of the now-deleted specialized function).
2158
2159 2012-11-05  Alexey Proskuryakov  <ap@apple.com>
2160
2161         Get rid of setCookieStoragePrivateBrowsingEnabled.
2162         https://bugs.webkit.org/show_bug.cgi?id=101247
2163
2164         Reviewed by Brady Eidson.
2165
2166         We were only doing anything here on Mac, and only because we couldn't know if
2167         sessions were in use. But sessions are always in use, and those obsolete changing
2168         cookie storage explicitly.
2169
2170         * platform/network/win/CookieStorageWin.cpp: Removed.
2171         * PlatformWinCE.cmake:
2172         * WebCore.gypi:
2173         No more CookieStorageWin.cpp with an empty implementation.
2174     
2175         * WebCore.exp.in:
2176         * platform/mac/WebCoreSystemInterface.h:
2177         * platform/mac/WebCoreSystemInterface.mm:
2178         We no longer need this WKSI function.
2179
2180         * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled):
2181         Removed the only call to setCookieStoragePrivateBrowsingEnabled().
2182
2183         * platform/network/CookieStorage.h:
2184         * platform/network/cf/CookieStorageCFNet.cpp:
2185         * platform/network/curl/CookieJarCurl.cpp:
2186         * platform/network/soup/CookieStorageSoup.cpp:
2187         * platform/qt/TemporaryLinkStubsQt.cpp:
2188         Removed empty setCookieStoragePrivateBrowsingEnabled implementations.
2189
2190         * platform/network/mac/CookieStorageMac.mm: This function used to have a FIXME
2191         that we should observe private storage while in private browsing mode. I don't think
2192         that it was correct - Safari doesn't display content of private storage, and thus
2193         doesn't need to know about changes.
2194         The removal of this function has an effect on WebKit1 clients that enable private
2195         browsing. We used to globally change cookie storage, even for loads not initiated
2196         by WebKit. Now we match API description: "If private browsing is enabled, WebKit
2197         will not store information about sites the user visits."
2198
2199 2012-11-05  Florin Malita  <fmalita@chromium.org>
2200
2201         Crash when mixing layers, foreignObjects and SVG hidden containers
2202         https://bugs.webkit.org/show_bug.cgi?id=87297
2203
2204         Reviewed by Dirk Schulze.
2205
2206         Foreign objects may introduce content which requires layers, but layer creation is
2207         suppressed within RenderSVGHiddenContainer subtrees and this yields an inconsistent render
2208         tree state. This patch prevents foreignObject renderer instantiation under
2209         RenderSVGHiddenContainers.
2210
2211         Test: svg/foreignObject/foreign-object-defs-crash.svg
2212
2213         * svg/SVGForeignObjectElement.cpp:
2214         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
2215         (WebCore):
2216         * svg/SVGForeignObjectElement.h:
2217         (SVGForeignObjectElement):
2218
2219 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
2220
2221         Remove the unused m_fixedPositionedElements from RenderView
2222         https://bugs.webkit.org/show_bug.cgi?id=101251
2223
2224         Reviewed by Anders Carlsson.
2225
2226         m_fixedPositionedElements was completely unused. Remove it
2227         and the related typedef.
2228
2229         * rendering/RenderView.h:
2230         (RenderView):
2231
2232 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
2233
2234         Fix layer borders to cleaning appear and disappear on switching
2235         https://bugs.webkit.org/show_bug.cgi?id=101136
2236
2237         Reviewed by Sam Weinig.
2238
2239         GraphicsLayers decided whether to show layer borders based
2240         on a callback through the GraphicsLayerClient. This made it
2241         hard to manage state, resulting in a failure to cleanly
2242         hide layers when toggled off via the preference.
2243         
2244         Changed the layer border and repaint counter visibility to be bits
2245         stored on GraphicsLayer just like other properties, with getters
2246         and setters. RenderLayerBacking now updates these debug
2247         indicators when we update other compositing layer properties.
2248         
2249         In GraphicsLayerCA, avoid calling updateDebugIndicators() explicitly
2250         in several places by setting the change flag DebugIndicatorsChanged
2251         for properties whose values affect the appearance of the debug border.
2252
2253         Removed the GraphicsLayerClient methods showDebugBorders() and
2254         showRepaintCounter() which are no longer required.
2255
2256         * platform/graphics/GraphicsLayer.cpp:
2257         (WebCore::GraphicsLayer::GraphicsLayer):
2258         (WebCore::GraphicsLayer::updateDebugIndicators):
2259         * platform/graphics/GraphicsLayer.h:
2260         (WebCore::GraphicsLayer::setShowDebugBorder):
2261         (WebCore::GraphicsLayer::isShowingDebugBorder):
2262         (WebCore::GraphicsLayer::setShowRepaintCounter):
2263         (WebCore::GraphicsLayer::isShowingRepaintCounter):
2264         (WebCore::GraphicsLayer::repaintCount):
2265         (WebCore::GraphicsLayer::incrementRepaintCount):
2266         * platform/graphics/GraphicsLayerClient.h:
2267         * platform/graphics/ca/GraphicsLayerCA.cpp:
2268         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2269         (WebCore::GraphicsLayerCA::setMasksToBounds):
2270         (WebCore::GraphicsLayerCA::setDrawsContent):
2271         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
2272         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2273         (WebCore::GraphicsLayerCA::updateMasksToBounds):
2274         (WebCore::GraphicsLayerCA::updateLayerDrawsContent):
2275         (WebCore::GraphicsLayerCA::updateDebugBorder):
2276         (WebCore::GraphicsLayerCA::setShowDebugBorder):
2277         (WebCore::GraphicsLayerCA::setShowRepaintCounter):
2278         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2279         (WebCore::GraphicsLayerCA::setupContentsLayer):
2280         (WebCore::GraphicsLayerCA::cloneLayer):
2281         * platform/graphics/ca/GraphicsLayerCA.h:
2282         (GraphicsLayerCA):
2283         (WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders):
2284         * rendering/RenderLayerBacking.cpp:
2285         (WebCore::RenderLayerBacking::updateDebugIndicators):
2286         * rendering/RenderLayerBacking.h:
2287         (RenderLayerBacking):
2288         * rendering/RenderLayerCompositor.cpp:
2289         (WebCore::RenderLayerCompositor::updateBacking):
2290         * rendering/RenderLayerCompositor.h:
2291         (RenderLayerCompositor):
2292
2293 2012-11-05  Genevieve Mak  <gmak@rim.com>
2294
2295         [BLACKBERRY] Update touch code to reflect touch refactor
2296         https://bugs.webkit.org/show_bug.cgi?id=101227
2297
2298         Reviewed by Rob Buis.
2299
2300         PR #2706785
2301         Reviewed Internally by: Mike Lattanzio
2302
2303         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
2304         (WebCore::touchEventType):
2305         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
2306
2307 2012-11-05  Alok Priyadarshi  <alokp@chromium.org>
2308
2309         [chromium] Pass canPaintLCDText to WebContentLayerClient::paintContents
2310         https://bugs.webkit.org/show_bug.cgi?id=99083
2311
2312         Reviewed by Stephen White.
2313
2314         Use LCD text setting passed to WebContentLayerClient::paintContents instead of turning it off for all composited layers.
2315
2316         No new tests needed. This patch does not change anything functionally.
2317
2318         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2319         (WebCore::GraphicsLayerChromium::setContentsOpaque):
2320         (WebCore::GraphicsLayerChromium::paint):
2321         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
2322         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
2323         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h:
2324         (OpaqueRectTrackingContentLayerDelegate):
2325
2326 2012-11-05  Stephen White  <senorblanco@chromium.org>
2327
2328         [chromium] Build fix after http://trac.webkit.org/changeset/133488.
2329         Removed a deleted file.  Unreviewed.
2330
2331         * WebCore.gypi:
2332
2333 2012-11-05  Kentaro Hara  <haraken@chromium.org>
2334
2335         [V8] toV8(impl) should return null if impl is 0
2336         https://bugs.webkit.org/show_bug.cgi?id=101206
2337
2338         Reviewed by Adam Barth.
2339
2340         toV8(impl) should return null if impl is 0. However,
2341         V8HTMLCollection::toV8() does not have the null check.
2342         All other toV8()s return null.
2343
2344         No tests. I think there will be no call path that hits the change.
2345
2346         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
2347         (WebCore::toV8):
2348
2349 2012-11-05  David Barton  <dbarton@mathscribe.com>
2350
2351         Implement SimpleFontData::platformBoundsForGlyph on skia
2352         https://bugs.webkit.org/show_bug.cgi?id=101115
2353
2354         Reviewed by Eric Seidel.
2355
2356         The implementation is similar to SimpleFontData::platformWidthForGlyph on skia.
2357
2358         Tested by: fast/block/lineboxcontain/*glyphs*, mathml/presentation/*
2359
2360         * platform/graphics/skia/SimpleFontDataSkia.cpp:
2361         (WebCore::SimpleFontData::platformBoundsForGlyph): Implemented.
2362
2363 2012-11-05  Andreas Kling  <kling@webkit.org>
2364
2365         Decouple Attr logic from ElementAttributeData.
2366         <http://webkit.org/b/101126>
2367
2368         Reviewed by Antti Koivisto.
2369
2370         Move all logic dealing with Attr DOM nodes from ElementAttributeData to Element.
2371         This makes more sense since an Attr is tied to a single Element, but an ElementAttributeData
2372         can be shared by any number of Elements at a given time.
2373
2374         Also updated naming convention from just "Attr" to "Attr node" in the code I was touching.
2375         "Attr" is way too generic, and has been historically confused with WebCore::Attribute a lot.
2376
2377         * dom/Element.h:
2378         * dom/ElementAttributeData.h:
2379         * dom/Element.cpp:
2380         (WebCore::attrNodeListMap):
2381         (WebCore::attrNodeListForElement):
2382         (WebCore::ensureAttrNodeListForElement):
2383         (WebCore::removeAttrNodeListForElement):
2384         (WebCore::findAttrNodeInList):
2385         (WebCore::Element::~Element):
2386         (WebCore::Element::detachAttribute):
2387         (WebCore::Element::setAttributeNode):
2388         (WebCore::Element::removeAttributeInternal):
2389         (WebCore::Element::getAttributeNode):
2390         (WebCore::Element::getAttributeNodeNS):
2391         (WebCore::Element::normalizeAttributes):
2392         (WebCore::Element::attrIfExists):
2393         (WebCore::Element::ensureAttr):
2394         (WebCore::Element::detachAttrNodeFromElementWithValue):
2395         (WebCore::Element::detachAllAttrNodesFromElement):
2396         (WebCore::Element::cloneAttributesFromElement):
2397
2398             Move everything Attr-related into Element.cpp while simplifying some loops and remove
2399             conditions that are no longer needed as they used to depend on having an attributeData().
2400
2401         * dom/Node.h:
2402         (WebCore::Node::hasSyntheticAttrChildNodes):
2403         (WebCore::Node::setHasSyntheticAttrChildNodes):
2404
2405             Renamed the hasAttrList() node flag to hasSyntheticAttrChildNodes().
2406
2407         * dom/Attr.cpp:
2408         (WebCore::Attr::detachFromElementWithValue):
2409
2410             Remove awkward indirection and let the call site deal with removing the Attr node from
2411             the Element's list of Attr nodes.
2412
2413         * dom/ElementAttributeData.cpp:
2414         (WebCore::ElementAttributeData::clearAttributes):
2415
2416             Remove now-unused Element* argument.
2417
2418 2012-11-05  Hans Muller  <hmuller@adobe.com>
2419
2420         [CSS Exclusions] Polygon edges should span colinear vertices
2421         https://bugs.webkit.org/show_bug.cgi?id=99343
2422
2423         Reviewed by Dirk Schulze.
2424
2425         ExclusionPolygonEdges now span coincident and collinear vertices. Currently
2426         pairs of vertices are only considered coincident if their coordinates are exactly
2427         equal. Similarly, a vertex is only considered collinear with an edge if the area
2428         of the triangle defined by the three vertices is exactly zero.  In the future it
2429         may be useful to relax the comparison with zero.
2430
2431         Tests: fast/exclusions/shape-inside/shape-inside-coincident-vertices.html
2432                fast/exclusions/shape-inside/shape-inside-collinear-vertices.html
2433
2434         * rendering/ExclusionPolygon.cpp:
2435         (WebCore::determinant): Used to measure collinearity.
2436         (WebCore):
2437         (WebCore::areCollinearPoints): True if three FloatPoint arguments are collinear per the test outlined above.
2438         (WebCore::areCoincidentPoints): True if the two FloatPoint arguments are equal.
2439         (WebCore::nextVertexIndex): The next vertex index in clockwise or counterclockwise order.
2440         (WebCore::ExclusionPolygon::findNextEdgeVertexIndex): Return the index of the next non-coincident, non-collinear vertex.
2441         (WebCore::ExclusionPolygon::ExclusionPolygon): Skip coincident and collinear vertices when building the list of edges.
2442         * rendering/ExclusionPolygon.h: Added private findNextEdgeVertexIndex() declaration.
2443
2444 2012-11-05  Christophe Dumez  <christophe.dumez@intel.com>
2445
2446         [EFL] Use POSIX implementation of SharedBuffer::createWithContentsOfFile()
2447         https://bugs.webkit.org/show_bug.cgi?id=101228
2448
2449         Reviewed by Kenneth Rohde Christiansen.
2450
2451         Get rid of EFL-specific implementation of SharedBuffer::createWithContentsOfFile()
2452         and reuse the POSIX one since it is pretty much the same.
2453
2454         No new tests, no behavior change.
2455
2456         * PlatformEfl.cmake:
2457         * platform/efl/SharedBufferEfl.cpp: Removed.
2458
2459 2012-11-05  Kentaro Hara  <haraken@chromium.org>
2460
2461         Add a comment about a return value of IDBKey::toV8()
2462         https://bugs.webkit.org/show_bug.cgi?id=101212
2463
2464         Reviewed by Adam Barth.
2465
2466         Although all other toV8(impl) return null when impl is 0,
2467         IDBKey::toV8(impl) is expected to return undefined when impl is 0.
2468         This patch adds a comment about it.
2469
2470         No tests.
2471
2472         * bindings/js/JSIDBKeyCustom.cpp:
2473         (WebCore::toJS):
2474         * bindings/v8/custom/V8IDBKeyCustom.cpp:
2475         (WebCore::toV8):
2476
2477 2012-11-05  Dominik Röttsches  <dominik.rottsches@intel.com>
2478
2479         [Cairo] Make Cairo honor image orientation
2480         https://bugs.webkit.org/show_bug.cgi?id=101207
2481
2482         Reviewed by Kenneth Rohde Christiansen.
2483
2484         Implement transformed image drawing in BitmapImageCairo, similar
2485         as it was done for Skia in bug 100179, r132384.
2486         The image drawing code needs to transform the graphics context
2487         depending on exif orientation in order for this to work.
2488
2489         No new tests, covered by fast/images/exif-* which are passing now.
2490
2491         * platform/graphics/BitmapImage.h: Enable draw function which respects image orientation for Cairo.
2492         * platform/graphics/cairo/BitmapImageCairo.cpp:
2493         (WebCore::BitmapImage::draw): Apply ImageOrientation's transformFromDefault() transformation to context.
2494         (WebCore):
2495
2496 2012-11-05  Kentaro Hara  <haraken@chromium.org>
2497
2498         [V8] Dispose() and Clear() should be always coupled for safety
2499         https://bugs.webkit.org/show_bug.cgi?id=101191
2500
2501         Reviewed by Adam Barth.
2502
2503         Clear() is not mandatory. However, to avoid misusing already
2504         disposed wrappers, Clear() should be always called just
2505         after Dispose().
2506
2507         No tests. No change in behavior.
2508
2509         * bindings/v8/DOMWrapperMap.h:
2510         (WebCore::DOMWrapperHashMap::defaultWeakCallback):
2511         * bindings/v8/IntrusiveDOMWrapperMap.h:
2512         (WebCore::IntrusiveDOMWrapperMap::weakCallback):
2513         * bindings/v8/NPV8Object.cpp:
2514         (WebCore::freeV8NPObject):
2515         * bindings/v8/ScheduledAction.cpp:
2516         (WebCore::ScheduledAction::~ScheduledAction):
2517         * bindings/v8/V8NPObject.cpp:
2518         (WebCore::V8NPTemplateMap::dispose):
2519         (WebCore::weakNPObjectCallback):
2520         (WebCore::forgetV8ObjectForNPObject):
2521         * bindings/v8/V8PerContextData.cpp:
2522         (WebCore::V8PerContextData::dispose):
2523         * bindings/v8/V8ValueCache.cpp:
2524         (WebCore::cachedStringCallback):
2525         (WebCore::IntegerCache::~IntegerCache):
2526         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2527         (WebCore::WeakReferenceCallback):
2528
2529 2012-11-05  Hans Muller  <hmuller@adobe.com>
2530
2531         [CSS Exclusions] Layout of the first shape-inside line can be incorrect
2532         https://bugs.webkit.org/show_bug.cgi?id=100996
2533
2534         Reviewed by Dirk Schulze.
2535
2536         Made the conversion from floating point top/bottom logical shape bounds coordinates
2537         LayoutUnits explicit and corrected the case where the top value was truncated.  A
2538         float logicalTop value is converted to LayoutUnit with fromFloatCeil() to ensure
2539         that the LayoutUnit value is within the shape.
2540         
2541         Test: fast/exclusions/shape-inside/shape-inside-shape-logical-top.html
2542
2543         * rendering/ExclusionShapeInsideInfo.h:
2544         (WebCore::ExclusionShapeInsideInfo::shapeLogicalTop): Redefined this method in terms of shapeLogicalBoundsY,Max().
2545         (WebCore::ExclusionShapeInsideInfo::shapeLogicalBottom):  Ditto.
2546         (WebCore::ExclusionShapeInsideInfo::lineOverlapsShapeBounds):  Ditto.
2547         (ExclusionShapeInsideInfo):
2548         (WebCore::ExclusionShapeInsideInfo::shapeLogicalBoundsY): Explicit conversion from floating point shape coordinates to LayoutUnits.
2549         (WebCore::ExclusionShapeInsideInfo::shapeLogicalBoundsMaxY): Ditto.
2550
2551 2012-11-05  Antti Koivisto  <antti@apple.com>
2552
2553         Protect against resource deletion during iteration in MemoryCache::pruneDeadResourcesToSize
2554         https://bugs.webkit.org/show_bug.cgi?id=101211
2555
2556         Reviewed by Andreas Kling.
2557         
2558         Some crashes have been seen under MemoryCache::pruneDeadResourcesToSize. A possible cause is that
2559         destroyDecodedData() call ends up evicting the resource pointed by 'previous' pointer during iteration
2560         and deleting the object. This looks in principle possible via stylesheets and SVG images.
2561         
2562         Speculative fix, no repro, no obvious way to construct a test.
2563
2564         * loader/cache/MemoryCache.cpp:
2565         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2566         
2567             Use CachedResourceHandle to protect the 'previous' pointer during iteration. Check if the
2568             resource has been kicked out from the cache during destroyDecodedData() and stop iterating
2569             if has (as it may die when CachedResourceHandle releases it).
2570             The 'current' pointer is not protected as the resource it points to is allowed to die.
2571             
2572 2012-11-05  Andrey Adaikin  <aandrey@chromium.org>
2573
2574         Web Inspector: Fix jscompiler cast syntax
2575         https://bugs.webkit.org/show_bug.cgi?id=101066
2576
2577         Reviewed by Pavel Feldman.
2578
2579         Casts should be in the form of "/** @type {TypeName} */ (expr)" instead of "/** @type {TypeName} */ expr".
2580
2581         * inspector/InjectedScriptCanvasModuleSource.js:
2582         (.):
2583         * inspector/InjectedScriptSource.js:
2584         (.):
2585         * inspector/front-end/ApplicationCacheModel.js:
2586         (WebInspector.ApplicationCacheModel.prototype._frameNavigated):
2587         (WebInspector.ApplicationCacheModel.prototype._frameDetached):
2588         * inspector/front-end/AuditLauncherView.js:
2589         (WebInspector.AuditLauncherView.prototype._onRequestStarted):
2590         (WebInspector.AuditLauncherView.prototype._onRequestFinished):
2591         * inspector/front-end/BreakpointManager.js:
2592         (WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
2593         (WebInspector.BreakpointManager.prototype._uiSourceCodeFormatted):
2594         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved):
2595         (WebInspector.BreakpointManager.prototype._breakpointResolved):
2596         (WebInspector.BreakpointManager.Breakpoint.prototype._locationUpdated):
2597         (WebInspector.BreakpointManager.Storage):
2598         * inspector/front-end/BreakpointsSidebarPane.js:
2599         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded):
2600         * inspector/front-end/CSSNamedFlowCollectionsView.js:
2601         (WebInspector.CSSNamedFlowCollectionsView.prototype._documentUpdated):
2602         (WebInspector.CSSNamedFlowCollectionsView.prototype._namedFlowCreated):
2603         (WebInspector.CSSNamedFlowCollectionsView.prototype._regionLayoutUpdated):
2604         (WebInspector.CSSNamedFlowCollectionsView.prototype._selectedNodeChanged):
2605         * inspector/front-end/CSSSelectorProfileView.js:
2606         (WebInspector.CSSProfileHeader.prototype.createView):
2607         * inspector/front-end/CSSStyleModel.js:
2608         (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
2609         (WebInspector.CSSStyleDeclaration.parseComputedStylePayload):
2610         * inspector/front-end/CompilerScriptMapping.js:
2611         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2612         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2613         * inspector/front-end/ConsoleView.js:
2614         (WebInspector.ConsoleView.prototype._frameAdded):
2615         (WebInspector.ConsoleView.prototype._frameRemoved):
2616         * inspector/front-end/DOMAgent.js:
2617         (WebInspector.DOMDocument):
2618         * inspector/front-end/DebuggerModel.js:
2619         (WebInspector.DebuggerModel.prototype.didSetBreakpoint):
2620         (WebInspector.DebuggerModel.prototype.setBreakpointByURL):
2621         (WebInspector.DebuggerModel.prototype.):
2622         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2623         (WebInspector.DebuggerModel.CallFrame.prototype.get location):
2624         * inspector/front-end/DebuggerScriptMapping.js:
2625         (WebInspector.DebuggerScriptMapping.prototype._parsedScriptSource):
2626         * inspector/front-end/DirectoryContentView.js:
2627         (WebInspector.DirectoryContentView.prototype._sort):
2628         * inspector/front-end/ElementsPanel.js:
2629         (WebInspector.ElementsPanel.prototype._updateBreadcrumbIfNeeded):
2630         * inspector/front-end/ElementsPanelDescriptor.js:
2631         (WebInspector.ElementsPanelDescriptor.prototype.appendApplicableItems):
2632         * inspector/front-end/ElementsTreeOutline.js:
2633         (.get node):
2634         * inspector/front-end/ExtensionServer.js:
2635         (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
2636         (WebInspector.ExtensionServer.prototype._handleOpenURL):
2637         (WebInspector.ExtensionServer.prototype._onGetResourceContent):
2638         (WebInspector.ExtensionServer.prototype._onSetResourceContent):
2639         (WebInspector.ExtensionServer.prototype._notifyResourceAdded):
2640         (WebInspector.ExtensionServer.prototype._notifyUISourceCodeContentCommitted):
2641         (WebInspector.ExtensionServer.prototype._notifyRequestFinished):
2642         * inspector/front-end/FileContentView.js:
2643         (WebInspector.FileContentView.prototype._metadataReceived):
2644         (WebInspector.FileContentView.FileContentProvider.prototype.requestContent):
2645         * inspector/front-end/FileSystemModel.js:
2646         (WebInspector.FileSystemModel.prototype._frameAdded):
2647         (WebInspector.FileSystemModel.prototype._frameNavigated):
2648         (WebInspector.FileSystemModel.prototype._frameDetached):
2649         * inspector/front-end/FileSystemView.js:
2650         (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect):
2651         (WebInspector.FileSystemView.EntryTreeElement.prototype.refresh):
2652         * inspector/front-end/HandlerRegistry.js:
2653         (WebInspector.HandlerRegistry.prototype._appendHrefItems):
2654         * inspector/front-end/HeapSnapshotLoader.js:
2655         (WebInspector.HeapSnapshotLoader.prototype.write):
2656         * inspector/front-end/HeapSnapshotView.js:
2657         (WebInspector.HeapSnapshotView.prototype._changeBase):
2658         (WebInspector.HeapProfileHeader.prototype.load):
2659         (WebInspector.HeapProfileHeader.prototype._snapshotReceived):
2660         * inspector/front-end/IndexedDBModel.js:
2661         (WebInspector.IndexedDBModel.prototype._frameNavigated):
2662         (WebInspector.IndexedDBModel.prototype._frameDetached):
2663         * inspector/front-end/IndexedDBViews.js:
2664         (WebInspector.IDBDataView.prototype._keyColumnHeaderFragment):
2665         * inspector/front-end/JavaScriptSourceFrame.js:
2666         (WebInspector.JavaScriptSourceFrame.prototype._onFormattedChanged):
2667         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
2668         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
2669         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessageAdded):
2670         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessageRemoved):
2671         (WebInspector.JavaScriptSourceFrame.prototype._handleGutterClick):
2672         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
2673         * inspector/front-end/MemoryStatistics.js:
2674         (WebInspector.MemoryStatistics.prototype.show):
2675         * inspector/front-end/NavigatorView.js:
2676         (WebInspector.NavigatorView.prototype._uiSourceCodeTitleChanged):
2677         (WebInspector.NavigatorView.prototype._uiSourceCodeWorkingCopyChanged):
2678         (WebInspector.NavigatorView.prototype._uiSourceCodeWorkingCopyCommitted):
2679         (WebInspector.NavigatorView.prototype._uiSourceCodeFormattedChanged):
2680         * inspector/front-end/NetworkLog.js:
2681         (WebInspector.NetworkLog.prototype._onRequestStarted):
2682         * inspector/front-end/NetworkManager.js:
2683         (WebInspector.NetworkManager.prototype._cacheDisabledSettingChanged):
2684         * inspector/front-end/NetworkPanel.js:
2685         (WebInspector.NetworkLogView.prototype._onRequestUpdated):
2686         (WebInspector.NetworkLogView.prototype._mainFrameNavigated):
2687         (WebInspector.NetworkPanel.prototype.reveal):
2688         (WebInspector.NetworkPanel.prototype.appendApplicableItems):
2689         * inspector/front-end/NetworkUISourceCodeProvider.js:
2690         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
2691         (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
2692         * inspector/front-end/ObjectPopoverHelper.js:
2693         (WebInspector.ObjectPopoverHelper.prototype.):
2694         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2695         * inspector/front-end/PresentationConsoleMessageHelper.js:
2696         (WebInspector.PresentationConsoleMessageHelper.prototype._consoleMessageAdded):
2697         (WebInspector.PresentationConsoleMessageHelper.prototype._parsedScriptSource):
2698         * inspector/front-end/ProfilesPanel.js:
2699         * inspector/front-end/ResourceScriptMapping.js:
2700         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
2701         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace):
2702         (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
2703         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
2704         * inspector/front-end/ResourceTreeModel.js:
2705         (WebInspector.ResourceTreeModel.prototype._onRequestFinished):
2706         (WebInspector.ResourceTreeModel.prototype._consoleMessageAdded):
2707         * inspector/front-end/ResourcesPanel.js:
2708         (WebInspector.ResourcesPanel.prototype._databaseAdded):
2709         (WebInspector.ResourcesPanel.prototype._domStorageAdded):
2710         (WebInspector.IndexedDBTreeElement.prototype._indexedDBAdded):
2711         (WebInspector.IndexedDBTreeElement.prototype._indexedDBRemoved):
2712         (WebInspector.IndexedDBTreeElement.prototype._indexedDBLoaded):
2713         (WebInspector.FileSystemListTreeElement.prototype._fileSystemAdded):
2714         (WebInspector.FileSystemListTreeElement.prototype._fileSystemRemoved):
2715         (WebInspector.FileSystemListTreeElement.prototype._fileSystemTreeElementByName):
2716         (WebInspector.SearchResultsTreeElementsTraverser.prototype._traverseNext):
2717         (WebInspector.SearchResultsTreeElementsTraverser.prototype._traversePrevious):
2718         * inspector/front-end/RevisionHistoryView.js:
2719         (WebInspector.RevisionHistoryView.prototype._uiSourceCodeRemoved):
2720         * inspector/front-end/SASSSourceMapping.js:
2721         (rawLocationToUILocation):
2722         * inspector/front-end/ScopeChainSidebarPane.js:
2723         (WebInspector.ScopeChainSidebarPane.prototype.update):
2724         * inspector/front-end/Script.js:
2725         (WebInspector.Script.Location.prototype.uiLocation):
2726         * inspector/front-end/ScriptFormatter.js:
2727         (WebInspector.ScriptFormatter.prototype.get _worker):
2728         * inspector/front-end/ScriptsPanel.js:
2729         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
2730         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
2731         (WebInspector.ScriptsPanel.prototype._editorClosed):
2732         (WebInspector.ScriptsPanel.prototype._editorSelected):
2733         (WebInspector.ScriptsPanel.prototype._scriptSelected):
2734         (WebInspector.ScriptsPanel.prototype.canSearchAndReplace):
2735         (WebInspector.ScriptsPanel.prototype.replaceSelectionWith):
2736         (WebInspector.ScriptsPanel.prototype.replaceAllWith):
2737         (WebInspector.ScriptsPanel.prototype._toggleBreakpoint):
2738         (WebInspector.ScriptsPanel.prototype.set _fileRenamed):
2739         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
2740         * inspector/front-end/ScriptsPanelDescriptor.js:
2741         (WebInspector.ScriptsPanelDescriptor.prototype.appendApplicableItems):
2742         * inspector/front-end/StylesSourceMapping.js:
2743         (WebInspector.StylesSourceMapping.prototype.rawLocationToUILocation):
2744         (WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace):
2745         * inspector/front-end/TabbedEditorContainer.js:
2746         (WebInspector.TabbedEditorContainer.prototype._scrollChanged):
2747         (WebInspector.TabbedEditorContainer.prototype._selectionChanged):
2748         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
2749         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
2750         (WebInspector.TabbedEditorContainer.prototype._uiSourceCodeTitleChanged):
2751         (WebInspector.TabbedEditorContainer.prototype._uiSourceCodeWorkingCopyChanged):
2752         (WebInspector.TabbedEditorContainer.prototype._uiSourceCodeWorkingCopyCommitted):
2753         (WebInspector.TabbedEditorContainer.prototype._uiSourceCodeFormattedChanged):
2754         * inspector/front-end/TimelineModel.js:
2755         (WebInspector.TimelineModelLoader.prototype.write):
2756         * inspector/front-end/UISourceCodeFrame.js:
2757         (WebInspector.UISourceCodeFrame.prototype._onFormattedChanged):
2758         * inspector/front-end/Workspace.js:
2759         (WebInspector.WorkspaceController.prototype._frameAdded):
2760         (WebInspector.Project.prototype._fileAdded):
2761         (WebInspector.Project.prototype._fileRemoved):
2762
2763 2012-11-05  Pavel Feldman  <pfeldman@chromium.org>
2764
2765         Web Inspector: render message bubbles in CodeMirror experiment.
2766         https://bugs.webkit.org/show_bug.cgi?id=101164
2767
2768         Reviewed by Vsevolod Vlasov.
2769
2770         It sounds like addLineWidget just makes it happen.
2771
2772         * inspector/front-end/CodeMirrorTextEditor.js:
2773         (WebInspector.CodeMirrorTextEditor):
2774         (WebInspector.CodeMirrorTextEditor.prototype.addDecoration):
2775         (WebInspector.CodeMirrorTextEditor.prototype.get if):
2776         (WebInspector.CodeMirrorTextEditor.prototype.removeDecoration):
2777         (WebInspector.CodeMirrorTextEditor.prototype._change):
2778         * inspector/front-end/DefaultTextEditor.js:
2779         (.preventDefaultOnMouseUp):
2780         * inspector/front-end/PresentationConsoleMessageHelper.js:
2781         (WebInspector.PresentationConsoleMessageHelper):
2782         * inspector/front-end/cm/cmdevtools.css:
2783         (.CodeMirror .webkit-html-message-bubble):
2784         (.CodeMirror .webkit-html-message-bubble img):
2785         (.CodeMirror .webkit-html-warning-message):
2786         (.CodeMirror .webkit-html-error-message):
2787
2788 2012-11-05  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2789
2790         Validate CSS Device Adaptation properties and resolve shorthands
2791         https://bugs.webkit.org/show_bug.cgi?id=95962
2792
2793         Reviewed by Alexis Menard.
2794
2795         Add the missing keywords and properties for the viewport at-rule.
2796         Note that we have to mark that we are inside a viewport scope because
2797         some properties are not validated as they would be inside a style
2798         rule. As an example, the semantics of CSSPropertyWidth are completely
2799         different: on a viewport rule, it stands for a shorthand for the
2800         minimum and maximum width.
2801
2802         Test: css3/device-adapt/viewport-properties-validation.html
2803
2804         * css/CSSComputedStyleDeclaration.cpp:
2805         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2806         * css/CSSParser.cpp:
2807         (WebCore::CSSParser::parseValue):
2808         (WebCore):
2809         (WebCore::CSSParser::parseViewportProperty):
2810         (WebCore::CSSParser::parseViewportShorthand):
2811         * css/CSSParser.h:
2812         * css/CSSProperty.cpp:
2813         (WebCore::CSSProperty::isInheritedProperty):
2814         * css/CSSPropertyNames.in:
2815         * css/CSSValueKeywords.in:
2816
2817 2012-11-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2818
2819         Unreviewed, rolling out r133286, r133385, and r133394.
2820         http://trac.webkit.org/changeset/133286
2821         http://trac.webkit.org/changeset/133385
2822         http://trac.webkit.org/changeset/133394
2823         https://bugs.webkit.org/show_bug.cgi?id=101198
2824
2825         Broke image placement on some web sites. (Requested by kling
2826         on #webkit).
2827
2828         * css/StyleResolver.cpp:
2829         (WebCore::StyleResolver::sweepMatchedPropertiesCache):
2830         (WebCore::StyleResolver::matchAllRules):
2831         (WebCore::StyleResolver::canShareStyleWithElement):
2832         * dom/Attr.cpp:
2833         (WebCore::Attr::detachFromElementWithValue):
2834         * dom/Element.cpp:
2835         (WebCore::Element::~Element):
2836         (WebCore::Element::detachAttribute):
2837         (WebCore::Element::getAttribute):
2838         (WebCore::Element::setAttributeNode):
2839         (WebCore::Element::removeAttributeInternal):
2840         (WebCore::Element::getAttributeNode):
2841         (WebCore::Element::getAttributeNodeNS):
2842         (WebCore::Element::normalizeAttributes):
2843         (WebCore::Element::attrIfExists):
2844         (WebCore::Element::ensureAttr):
2845         (WebCore::Element::cloneAttributesFromElement):
2846         * dom/Element.h:
2847         (Element):
2848         (WebCore::Element::updateInvalidAttributes):
2849         * dom/ElementAttributeData.cpp:
2850         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
2851         (WebCore):
2852         (WebCore::attrListMap):
2853         (WebCore::attrListForElement):
2854         (WebCore::ensureAttrListForElement):
2855         (WebCore::removeAttrListForElement):
2856         (WebCore::findAttrInList):
2857         (WebCore::ElementAttributeData::attrIfExists):
2858         (WebCore::ElementAttributeData::ensureAttr):
2859         (WebCore::ElementAttributeData::setAttr):
2860         (WebCore::ElementAttributeData::removeAttr):
2861         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2862         (WebCore::ElementAttributeData::reportMemoryUsage):
2863         (WebCore::ElementAttributeData::cloneDataFrom):
2864         (WebCore::ElementAttributeData::clearAttributes):
2865         (WebCore::ElementAttributeData::getAttributeNode):
2866         * dom/ElementAttributeData.h:
2867         (WebCore):
2868         (WebCore::ElementAttributeData::attributeStyle):
2869         (WebCore::ElementAttributeData::setAttributeStyle):
2870         (ElementAttributeData):
2871         (WebCore::ElementAttributeData::ElementAttributeData):
2872         * dom/Node.h:
2873         (WebCore):
2874         (WebCore::Node::hasAttrList):
2875         (WebCore::Node::attributeStyleDirty):
2876         (WebCore::Node::setAttributeStyleDirty):
2877         (WebCore::Node::clearAttributeStyleDirty):
2878         (Node):
2879         (WebCore::Node::setHasAttrList):
2880         (WebCore::Node::clearHasAttrList):
2881         (WebCore::Node::isStyleAttributeValid):
2882         (WebCore::Node::setIsStyleAttributeValid):
2883         (WebCore::Node::clearIsStyleAttributeValid):
2884         * dom/StyledElement.cpp:
2885         (WebCore::StyledElement::updateStyleAttribute):
2886         (WebCore::StyledElement::attributeChanged):
2887         (WebCore::StyledElement::styleAttributeChanged):
2888         (WebCore::StyledElement::inlineStyleChanged):
2889         (WebCore::StyledElement::updateAttributeStyle):
2890         * dom/StyledElement.h:
2891         (StyledElement):
2892         (WebCore::StyledElement::invalidateStyleAttribute):
2893         (WebCore::StyledElement::attributeStyle):
2894         * inspector/InspectorCSSAgent.cpp:
2895         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2896
2897 2012-11-05  Simon Hausmann  <simon.hausmann@digia.com>
2898
2899         Unreviewed trivial Qt build fix.
2900
2901         Surround imports from QtGui by QT_{BEGIN,END}_NAMESPACE to fix namespaced
2902         builds.
2903
2904         * platform/graphics/qt/GraphicsContextQt.cpp:
2905         * platform/graphics/qt/ImageQt.cpp:
2906
2907 2012-11-05  Shinya Kawanaka  <shinyak@chromium.org>
2908
2909         [Shadow] ShadowRoot type is not set correctly.
2910         https://bugs.webkit.org/show_bug.cgi?id=101188
2911
2912         Reviewed by Hajime Morita.
2913
2914         ShadowRoot type is not set correctly in Release build. We have had to remove #ifndef block.
2915
2916         Test: fast/dom/shadow/shadowroot-type.html
2917
2918         * dom/ShadowRoot.cpp:
2919         (WebCore::ShadowRoot::create):
2920         * testing/Internals.cpp:
2921         (WebCore::Internals::shadowRootType):
2922         (WebCore):
2923         * testing/Internals.h:
2924         (Internals):
2925         * testing/Internals.idl:
2926
2927 2012-11-05  Kent Tamura  <tkent@chromium.org>
2928
2929         BaseChooserOnlyDateAndTimeInputType should implement DateTimeChooserClient
2930         https://bugs.webkit.org/show_bug.cgi?id=101038
2931
2932         Reviewed by Hajime Morita.
2933
2934         Add DateTimeChooserClient behavior to BaseChooserOnlyDateAndTimeInputType.
2935         It means that date/time input elements without
2936         ENABLE_INPUT_MULTIPLE_FIELDS_UI can open date/time choosers by
2937         DOMActivate event.
2938
2939         This patch doesn't change behavior yet because Chromimum-Android port
2940         intercepts user events and doesn't deliver them to date/time input
2941         elements. <http://crbug.com/159381>
2942
2943         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
2944         Add DateTimeChooserClient behavior. The code is similar to
2945         PickerIndicatorElement.
2946         (WebCore::BaseChooserOnlyDateAndTimeInputType::~BaseChooserOnlyDateAndTimeInputType):
2947         Closes DateTimeChooser.
2948         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
2949         Open DateTimeChooser if
2950          - The element is not disabled,
2951          - The element is not read-only,
2952          - The element has a renderer,
2953          - This event is created by a user gesture, and
2954          - The element has no DateTimeChooser.
2955         (WebCore::BaseChooserOnlyDateAndTimeInputType::detach):
2956         Closes DateTimeChooser.
2957         (WebCore::BaseChooserOnlyDateAndTimeInputType::didChooseValue):
2958         Set a string value coming from a chooser to the input element.
2959         (WebCore::BaseChooserOnlyDateAndTimeInputType::didEndChooser):
2960         Clear m_dateTimeChooser when the chooser was closed.
2961         (WebCore::BaseChooserOnlyDateAndTimeInputType::closeDateTimeChooser):
2962         Requests to close the chooser.
2963         * html/BaseChooserOnlyDateAndTimeInputType.h:
2964         (BaseChooserOnlyDateAndTimeInputType):
2965          - Implement DateTimeChooserClient
2966          - Add closeDateTimeChooser helper function.
2967          - Add detach override.
2968          - Add m_dateTimeChooser.
2969         * html/HTMLInputElement.cpp:
2970         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
2971         Added. The code is moved from PickerIndicatorElement.cpp in order to
2972         share it with BaseChooserOnlyDateAndTimeInputType.
2973         * html/HTMLInputElement.h:
2974         (HTMLInputElement): Declare setupDateTimeChooserParameters.
2975         * html/shadow/PickerIndicatorElement.cpp:
2976         (WebCore::PickerIndicatorElement::openPopup):
2977         Move some code to HTMLInputElement::setupDateTimeChooserParameters.
2978
2979 2012-11-04  Julien Chaffraix  <jchaffraix@webkit.org>
2980
2981         Fix the collapsing border code to handle mixed directionality at the row level
2982         https://bugs.webkit.org/show_bug.cgi?id=101060
2983
2984         Reviewed by Ojan Vafai.
2985
2986         After bug 87900, we support mixed directionality at the row-group level. For coherency
2987         - as the underlying code didn't support it - we were artificially ignoring 'direction'
2988         below the row-group. This change relaxes the restriction and patches the collapsing
2989         borders code to query the right style and border.
2990
2991         Tests: fast/table/border-collapsing/table-ltr-rows-mixed-direction.html
2992                fast/table/border-collapsing/table-rtl-row-mixed-direction.html
2993
2994         * rendering/RenderTable.cpp:
2995         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
2996         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
2997         Changed to query the row's direction.
2998
2999         * rendering/RenderTableCell.cpp:
3000         (WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
3001         (WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
3002         Added 2 helper functions. They determine if a specific cell's border
3003         adjoins the table. This code is required as the last cell's end border
3004         can be resolved against the start border.
3005
3006         (WebCore::RenderTableCell::computeCollapsedStartBorder):
3007         (WebCore::RenderTableCell::computeCollapsedEndBorder):
3008         Updated these functions now that being the start / end column doesn't mean
3009         that we have to resolve against the row / row-group / table's border.
3010
3011         * rendering/RenderTableCell.h:
3012         (WebCore::RenderTableCell::styleForCellFlow):
3013         Updated to return the row's style.
3014
3015         * rendering/RenderTableRow.cpp:
3016         (WebCore::RenderTableRow::borderAdjoiningStartCell):
3017         (WebCore::RenderTableRow::borderAdjoiningEndCell):
3018         * rendering/RenderTableSection.cpp:
3019         (WebCore::RenderTableSection::borderAdjoiningStartCell):
3020         (WebCore::RenderTableSection::borderAdjoiningEndCell):
3021         Updated these functions to work with mixed directionality.
3022
3023         * rendering/RenderTableSection.cpp:
3024         (WebCore::RenderTableSection::setLogicalPositionForCell):
3025         Changed this function to use the section's direction. This is wrong and should be changed
3026         once we properly fix the collapsing border code.
3027
3028         (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection):
3029         Added a FIXME.
3030
3031         * rendering/style/CollapsedBorderValue.h:
3032         (WebCore::CollapsedBorderValue::width):
3033         This is a bug in our implementation: we used to return a non-zero width for inexistant borders (per CSS 2.1,
3034         'border-style: off | hidden' should have a 0 width). This is covered by our existing tests (among others by
3035         fast/table/border-collapsing/last-cell-left-border-hidden-table-ltr-section-rtl.html).
3036
3037 2012-11-04  Andrey Adaikin  <aandrey@chromium.org>
3038
3039         Web Inspector: [Canvas] do not blow up the capturing log
3040         https://bugs.webkit.org/show_bug.cgi?id=100752
3041
3042         Reviewed by Pavel Feldman.
3043
3044         Clear obsolete calls in the canvas 2D capturing log in runtime.
3045         Now we store in the log only minimum number of calls that are necessary to replay a
3046         canvas 2D context. To achieve that we find in runtime those calls in the log that no
3047         longer contribute to the final context state and remove them.
3048         These are the rules according which we find and remove such calls:
3049         - all PATH methods between a clip() call and beginPath() call can be removed
3050         - all MATRIX methods before a restore() or setTransform() call but after any PATH or corresponding save() method
3051         - all consecutive save() + restore() calls
3052
3053         Tests: inspector/profiler/canvas2d/canvas2d-api-changes.html
3054                inspector/profiler/canvas2d/canvas2d-profiler-capturing-basics.html
3055
3056         * inspector/InjectedScriptCanvasModuleSource.js:
3057         (.):
3058
3059 2012-11-04  Shinya Kawanaka  <shinyak@chromium.org>
3060
3061         [Shadow] ShadowRoot should have a method to return ShadowRootType.
3062         https://bugs.webkit.org/show_bug.cgi?id=101178
3063
3064         Reviewed by Hajime Morita.
3065
3066         When we style PseudoCustomElement, we have to know ShadowRootType.
3067         We would like to expose a method to get ShadowRootType also in Release mode.
3068
3069         This is a preparation patch for Bug 101170.
3070
3071         * dom/ShadowRoot.h:
3072         (ShadowRoot):
3073
3074 2012-11-04  Keishi Hattori  <keishi@webkit.org>
3075
3076         Introduce Month class to calendar picker
3077         https://bugs.webkit.org/show_bug.cgi?id=101024
3078
3079         Reviewed by Kent Tamura.
3080
3081         Month class needs to be introduced to implement a month picker. This
3082         patch just introduces the Month class into the calendar picker without
3083         changing the current behavior.
3084
3085         No new tests. Covered by existing calendar-picker-*.html tests.
3086
3087         * Resources/pagepopups/calendarPicker.js:
3088         (Month.prototype.toLocaleString): Returns a localized month string.
3089         (Month): Takes a Month object, number representing the month, or year and month numbers.
3090         (Month.parse): Returns a new Month from an ISO month string.
3091         (Month.createFromDate): Returns a new Month containing the given datetime.
3092         (Month.prototype.equals): Returns true if the given month is the same.
3093         (Month.prototype.previous): Returns the previous month.
3094         (Month.prototype.next): Returns the next month.
3095         (Month.prototype.startDate): Returns a datetime that is the start of this month. The value is inclusive.
3096         (Month.prototype.endDate): Returns a datetime that is the end of this month. The value is exclusive.
3097         (Month.prototype.valueOf): Returns a number representing the month.
3098         (Month.prototype.toString): Returns an ISO month string.
3099         (YearMonthController): Use Month object.
3100         (YearMonthController.prototype.attachTo): Year 275760 ends in September so use the year before to measure the label width.
3101         (YearMonthController.prototype.setMonth): Take a month object.
3102         (YearMonthController.prototype._redraw): Use ISO month string for element.dataset.value.
3103         (YearMonthController.prototype._handleYearMonthChange):
3104         (YearMonthController.prototype.moveRelatively):
3105         (DaysTable): Use Month object.
3106         (DaysTable.prototype._renderMonth): Take a month object. Testing for isNaN is moved up to fix a bug when showing September, 275760.
3107         (DaysTable.prototype._navigateToMonth): Take a month object.
3108         (DaysTable.prototype._navigateToMonthWithAnimation): Take a month object.
3109         (DaysTable.prototype.navigateToMonthAndKeepSelectionPosition): Take a month object.
3110         (DaysTable.prototype.selectDate):
3111         (DaysTable.prototype._maybeSetPreviousMonth): Use Month object to calculate the previous month.
3112         (DaysTable.prototype._maybeSetNextMonth): Use Month object to calculate the next month.
3113
3114 2012-11-04  Halton Huo  <halton.huo@intel.com>
3115
3116         [EFL] Use _LIBRARIES instead of _LIBRARY
3117         https://bugs.webkit.org/show_bug.cgi?id=101042
3118
3119         Reviewed by Gyuyoung Kim.
3120
3121         In CMake Find files, _LIBRARY is intended for internal use, should
3122         use _LIBRARIES instead.
3123
3124         * PlatformEfl.cmake: s/_LIBRARY}/_LIBRARIES}
3125
3126 2012-11-04  MORITA Hajime  <morrita@google.com>
3127
3128         Shadow DOM should be able to be disabled per context.
3129         https://bugs.webkit.org/show_bug.cgi?id=101173
3130
3131         Reviewed by Dimitri Glazkov.
3132
3133         This change pulls back relevant bits from r131549. Note that if
3134         the the port enables runtime Shadow DOM flag, this can cause slow
3135         down on some Chromium page cycler test cases (which r131549
3136         attempted to fix).
3137
3138         This change is temporal and the flags should be switched back from
3139         ContextFeatures to RuntimeEnabledFeatures once it gains sufficent
3140         stability.
3141
3142         * dom/ContextFeatures.cpp:
3143         (WebCore::ContextFeatures::shadowDOMEnabled):
3144         (WebCore):
3145         * dom/ContextFeatures.h:
3146         * dom/Position.cpp:
3147         (WebCore::Position::Position):
3148         (WebCore::Position::findParent):
3149         * dom/TreeScope.cpp:
3150         (WebCore::TreeScope::getSelection):
3151         * html/HTMLTagNames.in:
3152         * html/shadow/HTMLContentElement.cpp:
3153         (WebCore::HTMLContentElement::contentTagName):
3154         * page/DOMWindow.idl:
3155
3156 2012-11-04  Shinya Kawanaka  <shinyak@chromium.org>
3157
3158         [Shadow] Implement custom pseudo-elements styling
3159         https://bugs.webkit.org/show_bug.cgi?id=100812
3160
3161         Reviewed by Hajime Morita.
3162
3163         Instead of using ElementRareData::m_shadowPseudoId, we use 'pseudo' attribute.
3164
3165         Later we would like to remove Element::shadowPseudoId and Element::setShadowPseudoId
3166         and use pseudo()/setPseudo() instead (Bug 101171).
3167
3168         Test: fast/dom/shadow/styling-pseudo-attribute.html
3169
3170         * dom/Element.cpp:
3171         (WebCore::Element::shadowPseudoId):
3172         (WebCore::Element::setShadowPseudoId):
3173         * dom/ElementRareData.cpp:
3174         (WebCore::ElementRareData::reportMemoryUsage):
3175         * dom/ElementRareData.h:
3176         (ElementRareData):
3177
3178 2012-11-04  Kent Tamura  <tkent@chromium.org>
3179
3180         BaseChooserOnlyDateAndTimeInputType should have BaseClickableWithKeyInputType behavior
3181         https://bugs.webkit.org/show_bug.cgi?id=101039
3182
3183         Reviewed by Hajime Morita.
3184
3185         Add BaseClickableWithKeyInputType behavior to
3186         BaseChooserOnlyDateAndTimeInputType. It means date/time input types
3187         without ENABLE_INPUT_MULTIPLE_FIELDS_UI receive DOMActivate events by
3188         pressing space or enter key. They're going to open a date/time chooser
3189         by DOMActive event.
3190
3191         Because BaseChooserOnlyDateAndTimeInputType inherits from
3192         BaseDateAndTimeInputType, it can't inherit
3193         BaseClickableWithKeyInputType. So, this patch adds static helper
3194         functions to BaseClickableWithKeyInputType, and
3195         BaseChooserOnlyDateAndTimeInputType uses them.
3196
3197         This patch doesn't change behavior yet because Chromimum-Android port
3198         intercepts user events and doesn't deliver them to date/time input
3199         elements.
3200
3201         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
3202         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
3203         Add an empty implementation with a FIXME comment.
3204         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeydownEvent):
3205         Add BaseClickableWithKeyInputType behavior by a helper function.
3206         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeypressEvent): Ditto.
3207         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeyupEvent): Ditto.
3208         (WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction): Ditto.
3209         * html/BaseChooserOnlyDateAndTimeInputType.h:
3210         (BaseChooserOnlyDateAndTimeInputType): Add function declarations.
3211         * html/BaseClickableWithKeyInputType.cpp:
3212         Add static helper functions, and existing member functions use them.
3213         * html/BaseClickableWithKeyInputType.h:
3214         (BaseClickableWithKeyInputType): Add declarations of the helper functions.
3215         * html/InputType.h:
3216         (InputType): Make dispatchSimulatedClickIfActive public because it is
3217         called from a helper function.
3218
3219 2012-11-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3220
3221         Unreviewed, rolling out r133416.
3222         http://trac.webkit.org/changeset/133416
3223         https://bugs.webkit.org/show_bug.cgi?id=101169
3224
3225         Broke world selection by right click (Requested by rniwa on
3226         #webkit).
3227
3228         * page/EventHandler.cpp:
3229         (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
3230         (WebCore::EventHandler::sendContextMenuEvent):
3231
3232 2012-11-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3233
3234         Missing ASCIILiteral in a place of accessibility
3235         https://bugs.webkit.org/show_bug.cgi?id=101160
3236
3237         Reviewed by Darin Adler.
3238
3239         ASCIILiteral usage is being missed in a spot of accessibliity.
3240
3241         * accessibility/AccessibilityMediaControls.cpp:
3242         (WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):
3243
3244 2012-11-03  Balazs Kelemen  <kbalazs@webkit.org>
3245
3246         [Qt][WK2] setPlatformStrategies always asserts after r132744
3247         https://bugs.webkit.org/show_bug.cgi?id=100838
3248
3249         Reviewed by Simon Hausmann.
3250
3251         Reland with build fixes.
3252
3253         The problem here is that we use QWebSettings::clearMemoryCaches, a WebKit1 API
3254         from the injected bundle, which calls initializeWebCoreQt and it sets the platform
3255         strategies to the one for WebKit1. We should stop using WebKit1 API's from WebKit2
3256         code. In order to keep the behavior, this patch adds exported helpers to WebCore
3257         that can be used from DumpRenderTree and WebKitTestRunner. This is the same idea
3258         as WebCoreTestSupport but these helpers are specific to Qt. Technically we could
3259         add it to the WebKit1 API for the time being, but my goal was to move in the direction
3260         of removing the WebKit1 dependency from WebKitTestRunner. We only build the file
3261         in non production mode.
3262
3263         Basically covered by all tests.
3264
3265         * Target.pri:
3266         * WebCore.pri: We need to link against fontconfig (only in non-production mode) since
3267         initializeTestFonts uses it.
3268         * platform/qt/QtTestSupport.cpp: Added. I choose GPL license because code from qwebsettings.cpp
3269         is also under that.
3270         (WebKit):
3271         (WebKit::QtTestSupport::clearMemoryCaches): This is basically a copy of QWebSettings::clearMemoryCaches
3272         without calling initializeWebCoreQt.
3273         (WebKit::QtTestSupport::initializeTestFonts): I moved this code here as well now that we have to expose
3274         symbols from WebCore anyway. The advantage is that now we don't have to build it twice and we don't need
3275         additional files to forward it from the directory of DumpRenderTree for WebKitTestRunner.
3276         I added a call to FontCace::invalidate in the case when the font set has been changed so that it will do
3277         the job even if we would stop clearing all caches between tests. Also moved the call to
3278         QFontDatabase::removeAllApplicationFonts from callers to here.
3279         * platform/qt/QtTestSupport.h:
3280         (WebKit):
3281         (QtTestSupport):
3282
3283 2012-11-04  Florin Malita  <fmalita@chromium.org>
3284
3285         Color-profile property triggers assert
3286         https://bugs.webkit.org/show_bug.cgi?id=101080
3287
3288         Reviewed by Dirk Schulze.
3289
3290         CSSPropertyColorProfile is not handled in StyleResolver::applySVGProperty(), triggering the
3291         unimplemented property assert. Adding a stub entry to avoid that.
3292
3293         Test: svg/css/color-profile-crash.html
3294
3295         * css/SVGCSSStyleSelector.cpp:
3296         (WebCore::StyleResolver::applySVGProperty):
3297
3298 2012-11-04  Kaustubh Atrawalkar  <kaustubh@motorola.com>
3299
3300         Unable to copy text on disabled input fields on long press gesture
3301         https://bugs.webkit.org/show_bug.cgi?id=99698
3302
3303         Reviewed by Ryosuke Niwa.
3304
3305         Text from disabled input/text should be allowed to select. Replaced isContentEditable()
3306         with canStartSelection()
3307
3308         Test: fast/events/touch/gesture/disabled-input-text-selection.html
3309
3310         * page/EventHandler.cpp:
3311         (WebCore::EventHandler::handleGestureLongPress):
3312
3313 2012-11-03  Sheriff Bot  <webkit.review.bot@gmail.com>
3314
3315         Unreviewed, rolling out r133403, r133404, and r133409.
3316         http://trac.webkit.org/changeset/133403
3317         http://trac.webkit.org/changeset/133404
3318         http://trac.webkit.org/changeset/133409
3319         https://bugs.webkit.org/show_bug.cgi?id=101158
3320
3321         "Broke tests" (Requested by kbalazs on #webkit).
3322
3323         * Target.pri:
3324         * WebCore.pri:
3325         * platform/qt/QtTestSupport.h: Removed.
3326
3327 2012-11-03  Alexey Proskuryakov  <ap@apple.com>
3328
3329         Get rid of USE(CFURLSTORAGESESSIONS)
3330         https://bugs.webkit.org/show_bug.cgi?id=101131
3331
3332         Reviewed by Sam Weinig.
3333
3334         This is always enabled on CFNetwork based platforms.
3335
3336         * WebCore.exp.in:
3337         * page/Settings.cpp:
3338         (WebCore::Settings::setPrivateBrowsingEnabled):
3339         * platform/mac/CookieJar.mm:
3340         (WebCore::cookies):
3341         (WebCore::cookieRequestHeaderFieldValue):
3342         (WebCore::setCookies):
3343         (WebCore::cookiesEnabled):
3344         (WebCore::getRawCookies):
3345         (WebCore::deleteCookie):
3346         * platform/network/ResourceHandle.h:
3347         (ResourceHandle):
3348         * platform/network/cf/CookieStorageCFNet.cpp:
3349         (WebCore):
3350         (WebCore::currentCFHTTPCookieStorage):
3351         * platform/network/cf/CookieStorageCFNet.h:
3352         * platform/network/cf/ResourceHandleCFNet.cpp:
3353         (WebCore::willSendRequest):
3354         (WebCore::makeFinalRequest):
3355         (WebCore::ResourceHandle::willSendRequest):
3356         (WebCore):
3357         * platform/network/cf/ResourceRequest.h:
3358         (ResourceRequest):
3359         * platform/network/cf/ResourceRequestCFNet.cpp:
3360         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3361         (WebCore):
3362         * platform/network/mac/CookieStorageMac.mm:
3363         (WebCore::setCookieStoragePrivateBrowsingEnabled):
3364         * platform/network/mac/ResourceHandleMac.mm:
3365         (WebCore::shouldRelaxThirdPartyCookiePolicy):
3366         (WebCore::ResourceHandle::createNSURLConnection):
3367         (WebCore::ResourceHandle::willSendRequest):
3368         (WebCore):
3369         * platform/network/mac/ResourceRequestMac.mm:
3370         (WebCore):
3371         (WebCore::ResourceRequest::setStorageSession):
3372
3373 2012-11-03  Balazs Kelemen  <kbalazs@webkit.org>
3374
3375         [Qt][WK2] setPlatformStrategies always asserts after r132744
3376         https://bugs.webkit.org/show_bug.cgi?id=100838
3377
3378         Reviewed by Simon Hausmann.
3379
3380         Reland with build fix.
3381
3382         The problem here is that we use QWebSettings::clearMemoryCaches, a WebKit1 API
3383         from the injected bundle, which calls initializeWebCoreQt and it sets the platform
3384         strategies to the one for WebKit1. We should stop using WebKit1 API's from WebKit2
3385         code. In order to keep the behavior, this patch adds exported helpers to WebCore
3386         that can be used from DumpRenderTree and WebKitTestRunner. This is the same idea
3387         as WebCoreTestSupport but these helpers are specific to Qt. Technically we could
3388         add it to the WebKit1 API for the time being, but my goal was to move in the direction
3389         of removing the WebKit1 dependency from WebKitTestRunner. We only build the file
3390         in non production mode.
3391
3392         Basically covered by all tests.
3393
3394         * Target.pri:
3395         * WebCore.pri: We need to link against fontconfig (only in non-production mode) since
3396         initializeTestFonts uses it.
3397         * platform/qt/QtTestSupport.cpp: Added. I choose GPL license because code from qwebsettings.cpp
3398         is also under that.
3399         (WebKit):
3400         (WebKit::QtTestSupport::clearMemoryCaches): This is basically a copy of QWebSettings::clearMemoryCaches
3401         without calling initializeWebCoreQt.
3402         (WebKit::QtTestSupport::initializeTestFonts): I moved this code here as well now that we have to expose
3403         symbols from WebCore anyway. The advantage is that now we don't have to build it twice and we don't need
3404         additional files to forward it from the directory of DumpRenderTree for WebKitTestRunner.
3405         I added a call to FontCace::invalidate in the case when the font set has been changed so that it will do
3406         the job even if we would stop clearing all caches between tests. Also moved the call to
3407         QFontDatabase::removeAllApplicationFonts from callers to here.
3408         * platform/qt/QtTestSupport.h:
3409         (WebKit):
3410         (QtTestSupport):
3411
3412 2012-11-03  Sheriff Bot  <webkit.review.bot@gmail.com>
3413
3414         Unreviewed, rolling out r133397.