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