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